From 8002d7502e091fe7c3599c159b63472c507fae20 Mon Sep 17 00:00:00 2001 From: "bodong.yang" Date: Thu, 19 Dec 2024 05:39:18 +0000 Subject: [PATCH] fix up tests according to ecu_status_flags --- tests/test_otaclient/test_create_standby.py | 2 +- tests/test_otaclient/test_ota_core.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_otaclient/test_create_standby.py b/tests/test_otaclient/test_create_standby.py index 9ade8cd1b..cb2abf3bf 100644 --- a/tests/test_otaclient/test_create_standby.py +++ b/tests/test_otaclient/test_create_standby.py @@ -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 diff --git a/tests/test_otaclient/test_ota_core.py b/tests/test_otaclient/test_ota_core.py index ffaab77b0..397e59098 100644 --- a/tests/test_otaclient/test_ota_core.py +++ b/tests/test_otaclient/test_ota_core.py @@ -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 ) @@ -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) @@ -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 )