Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ccruzagralopes committed Nov 14, 2023
1 parent 397a07b commit c7c6efe
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion app/tests/chip_tool/test_chip_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@ async def test_run_test_default_config() -> None:
return_value=fake_container,
), mock.patch.object(
target=chip_tool, attribute="start_chip_server"
), mock.patch(
target="app.chip_tool.chip_tool.WebSocketRunner.start",
return_value=True,
), mock.patch(
target="app.chip_tool.chip_tool.WebSocketRunner.run",
return_value=True,
Expand All @@ -610,7 +613,7 @@ async def test_run_test_default_config() -> None:
runner_config: TestRunnerConfig = mock_run.mock_calls[0].args[1]
runner_options = runner_config.options
assert runner_options.stop_on_error is not CHIP_TOOL_CONTINUE_ON_FAILURE_VALUE
assert runner_options.stop_on_warning is False
assert runner_options.stop_on_warning is False

Check failure on line 616 in app/tests/chip_tool/test_chip_tool.py

View workflow job for this annotation

GitHub Actions / Flake8

app/tests/chip_tool/test_chip_tool.py#L616

Trailing whitespace (W291)
assert runner_options.stop_at_number == -1
assert runner_options.delay_in_ms == TEST_STEP_DELAY_VALUE

Expand Down Expand Up @@ -639,6 +642,9 @@ async def test_run_test_custom_timeout() -> None:
return_value=fake_container,
), mock.patch.object(
target=chip_tool, attribute="start_chip_server"
), mock.patch(
target="app.chip_tool.chip_tool.WebSocketRunner.start",
return_value=True,
), mock.patch(
target="app.chip_tool.chip_tool.WebSocketRunner.run",
return_value=True,
Expand Down Expand Up @@ -687,6 +693,9 @@ async def test_run_test_with_custom_parameter() -> None:
return_value=fake_container,
), mock.patch.object(
target=chip_tool, attribute="start_chip_server"
), mock.patch(
target="app.chip_tool.chip_tool.WebSocketRunner.start",
return_value=True,
), mock.patch(
target="app.chip_tool.chip_tool.WebSocketRunner.run",
return_value=True,
Expand Down Expand Up @@ -736,6 +745,9 @@ async def test_run_test_with_endpoint_parameter() -> None:
return_value=fake_container,
), mock.patch.object(
target=chip_tool, attribute="start_chip_server"
), mock.patch(
target="app.chip_tool.chip_tool.WebSocketRunner.start",
return_value=True,
), mock.patch(
target="app.chip_tool.chip_tool.WebSocketRunner.run",
return_value=True,
Expand Down Expand Up @@ -784,6 +796,9 @@ async def test_run_test_with_nodeID_and_cluster_parameters() -> None:
return_value=fake_container,
), mock.patch.object(
target=chip_tool, attribute="start_chip_server"
), mock.patch(
target="app.chip_tool.chip_tool.WebSocketRunner.start",
return_value=True,
), mock.patch(
target="app.chip_tool.chip_tool.WebSocketRunner.run",
return_value=True,
Expand Down

0 comments on commit c7c6efe

Please sign in to comment.