@@ -79,6 +79,12 @@ def pytest_addoption(parser: pytest.Parser) -> None:
7979 default = False ,
8080 help = "Whether product is billable or not" ,
8181 )
82+ group .addoption (
83+ "--product-lite" ,
84+ action = "store_true" ,
85+ default = False ,
86+ help = "Whether product is lite version or not" ,
87+ )
8288 group .addoption (
8389 "--autoscaled" ,
8490 action = "store_true" ,
@@ -227,13 +233,19 @@ def user_password(
227233
228234
229235@pytest .fixture (scope = "session" )
230- def product_billable (request : pytest .FixtureRequest ) -> bool :
236+ def is_product_billable (request : pytest .FixtureRequest ) -> bool :
231237 billable = request .config .getoption ("--product-billable" )
232238 return TypeAdapter (bool ).validate_python (billable )
233239
234240
235241@pytest .fixture (scope = "session" )
236- def autoscaled (request : pytest .FixtureRequest ) -> bool :
242+ def is_product_lite (request : pytest .FixtureRequest ) -> bool :
243+ enabled = request .config .getoption ("--product-lite" )
244+ return TypeAdapter (bool ).validate_python (enabled )
245+
246+
247+ @pytest .fixture (scope = "session" )
248+ def is_autoscaled (request : pytest .FixtureRequest ) -> bool :
237249 autoscaled = request .config .getoption ("--autoscaled" )
238250 return TypeAdapter (bool ).validate_python (autoscaled )
239251
@@ -392,7 +404,7 @@ def log_in_and_out(
392404def create_new_project_and_delete (
393405 page : Page ,
394406 log_in_and_out : WebSocket ,
395- product_billable : bool ,
407+ is_product_billable : bool ,
396408 api_request_context : APIRequestContext ,
397409 product_url : AnyUrl ,
398410) -> Iterator [Callable [[tuple [RunningState ], bool ], dict [str , Any ]]]:
@@ -411,7 +423,7 @@ def _(
411423 ), "misuse of this fixture! only 1 study can be opened at a time. Otherwise please modify the fixture"
412424 with log_context (
413425 logging .INFO ,
414- f"Open project in { product_url = } as { product_billable = } " ,
426+ f"Open project in { product_url = } as { is_product_billable = } " ,
415427 ) as ctx :
416428 waiter = SocketIOProjectStateUpdatedWaiter (expected_states = expected_states )
417429 timeout = (
@@ -473,7 +485,7 @@ def wait_for_done(response):
473485 ...
474486 else :
475487 open_button .click ()
476- if product_billable :
488+ if is_product_billable :
477489 # Open project with default resources
478490 page .get_by_test_id ("openWithResources" ).click ()
479491 project_data = response_info .value .json ()
@@ -512,7 +524,7 @@ def wait_for_done(response):
512524 for project_uuid in created_project_uuids :
513525 with log_context (
514526 logging .INFO ,
515- f"Delete project with { project_uuid = } in { product_url = } as { product_billable = } " ,
527+ f"Delete project with { project_uuid = } in { product_url = } as { is_product_billable = } " ,
516528 ):
517529 response = api_request_context .delete (
518530 f"{ product_url } v0/projects/{ project_uuid } "
0 commit comments