Skip to content

Commit

Permalink
fix up tests according to ecu_status_flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodong-Yang committed Dec 19, 2024
1 parent fccf4fe commit 8002d75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/test_otaclient/test_create_standby.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def test_update_with_rebuild_mode(
# ------ assertions ------ #
persist_handler.assert_called_once()

ecu_status_flags.any_requires_network.is_set.assert_called_once()
ecu_status_flags.any_child_ecu_in_update.is_set.assert_called_once()
# --- ensure the update stats are collected
collected_status = status_collector.otaclient_status
assert collected_status
Expand Down
6 changes: 3 additions & 3 deletions tests/test_otaclient/test_ota_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def test_otaupdater(
) -> None:
_, report_queue = ota_status_collector
ecu_status_flags = mocker.MagicMock()
ecu_status_flags.any_requires_network.is_set = mocker.MagicMock(
ecu_status_flags.any_child_ecu_in_update.is_set = mocker.MagicMock(
return_value=False
)

Expand Down Expand Up @@ -202,7 +202,7 @@ def test_otaupdater(
assert _downloaded_files_size == self._delta_bundle.total_download_files_size

# assert the control_flags has been waited
ecu_status_flags.any_requires_network.is_set.assert_called_once()
ecu_status_flags.any_child_ecu_in_update.is_set.assert_called_once()

assert _updater.update_version == str(cfg.UPDATE_VERSION)

Expand Down Expand Up @@ -235,7 +235,7 @@ def mock_setup(
):
_, status_report_queue = ota_status_collector
ecu_status_flags = mocker.MagicMock()
ecu_status_flags.any_requires_network.is_set = mocker.MagicMock(
ecu_status_flags.any_child_ecu_in_update.is_set = mocker.MagicMock(
return_value=False
)

Expand Down

0 comments on commit 8002d75

Please sign in to comment.