File tree Expand file tree Collapse file tree 1 file changed +0
-39
lines changed
Expand file tree Collapse file tree 1 file changed +0
-39
lines changed Original file line number Diff line number Diff line change @@ -323,42 +323,3 @@ def enable_network_options():
323323 json = {"network" : False },
324324 timeout = 10 ,
325325 )
326-
327-
328- @fixture
329- def experimental_features ():
330- """
331- Fixture to temporarily set experimental features for a test.
332-
333- Usage:
334- def test_example(experimental_features):
335- experimental_features({"multimodal": True, "new_ui": True})
336- """
337- def _set_features (features : dict ):
338- # Enable features
339- requests .patch (
340- f"{ common .BASE_URL } /experimental-features" ,
341- headers = {"Authorization" : f"Bearer { common .MASTER_KEY } " },
342- json = features ,
343- timeout = 10 ,
344- )
345- # Return features so we can reset later
346- return features
347-
348- yield _set_features
349-
350- # Reset features after the test
351- def _reset (features : dict ):
352- # Create a reset payload inside the function
353- reset_payload = {key : False for key in features .keys ()}
354- requests .patch (
355- f"{ common .BASE_URL } /experimental-features" ,
356- headers = {"Authorization" : f"Bearer { common .MASTER_KEY } " },
357- json = reset_payload ,
358- timeout = 10 ,
359- )
360-
361- @fixture
362- def multimodal_enabled (experimental_features ):
363- """Convenience fixture: enables multimodal experimental feature."""
364- experimental_features ({"multimodal" : True })
You can’t perform that action at this time.
0 commit comments