Skip to content

Commit 028cb9d

Browse files
fix unittests
1 parent fe0c96d commit 028cb9d

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

tests/unit/tools/askui/test_askui_controller_settings.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,12 +399,14 @@ def test_assertion_error_when_no_controller_found(self) -> None:
399399

400400
def test_controller_args_default_value(self) -> None:
401401
"""Test that controller_args is set correctly with default value."""
402-
settings = AskUiControllerSettings()
402+
settings = AskUiControllerSettings(component_registry_file="/dummy")
403403
assert settings.controller_args == "--showOverlay true"
404404

405405
def test_controller_args_constructor(self) -> None:
406406
"""Test that controller_args is set correctly with constructor."""
407-
settings = AskUiControllerSettings(controller_args="--showOverlay false")
407+
settings = AskUiControllerSettings(
408+
controller_args="--showOverlay false", component_registry_file="/dummy"
409+
)
408410
assert settings.controller_args == "--showOverlay false"
409411

410412
def test_controller_args_with_environment_variable(self) -> None:
@@ -413,11 +415,10 @@ def test_controller_args_with_environment_variable(self) -> None:
413415
"os.environ",
414416
{
415417
"ASKUI_CONTROLLER_ARGS": "--showOverlay false",
416-
"ASKUI_COMPONENT_REGISTRY_FILE": "dummy",
417418
},
418419
clear=True,
419420
):
420-
settings = AskUiControllerSettings()
421+
settings = AskUiControllerSettings(component_registry_file="/dummy")
421422
assert settings.controller_args == "--showOverlay false"
422423

423424
def test_controller_args_with_invalid_arg(self) -> None:

0 commit comments

Comments
 (0)