From ccf67cca4858e244e25d2fb02fbc04c0bf5f23ff Mon Sep 17 00:00:00 2001 From: "bodong.yang" Date: Fri, 22 Sep 2023 07:28:30 +0000 Subject: [PATCH] fix test_grub --- tests/test_boot_control/test_grub.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_boot_control/test_grub.py b/tests/test_boot_control/test_grub.py index 4f045937a..180a5d6a1 100644 --- a/tests/test_boot_control/test_grub.py +++ b/tests/test_boot_control/test_grub.py @@ -219,7 +219,7 @@ def mock_setup( mocker: pytest_mock.MockerFixture, grub_ab_slot, ): - from otaclient.app.boot_control._grub import GrubABPartitionDetecter + from otaclient.app.boot_control._grub import GrubABPartitionDetector from otaclient.app.boot_control._common import CMDHelperFuncs, SlotMountHelper # ------ start fsm ------ # @@ -244,7 +244,7 @@ def mock_setup( ) # ------ mock GrubABPartitionDetector ------ # - _mocked_ab_partition_detector = mocker.MagicMock(spec=GrubABPartitionDetecter) + _mocked_ab_partition_detector = mocker.MagicMock(spec=GrubABPartitionDetector) type(_mocked_ab_partition_detector).active_slot = mocker.PropertyMock( wraps=self._fsm.get_active_slot ) @@ -293,12 +293,12 @@ def mock_setup( _CMDHelper_at_grub_path = f"{cfg.GRUB_MODULE_PATH}.CMDHelperFuncs" mocker.patch(_CMDHelper_at_common_path, _CMDHelper_mock) mocker.patch(_CMDHelper_at_grub_path, _CMDHelper_mock) - # patch _GrubABPartitionDetecter - _GrubABPartitionDetecter_path = ( - f"{cfg.GRUB_MODULE_PATH}.GrubABPartitionDetecter" + # patch _GrubABPartitionDetector + _GrubABPartitionDetector_path = ( + f"{cfg.GRUB_MODULE_PATH}.GrubABPartitionDetector" ) mocker.patch( - _GrubABPartitionDetecter_path, return_value=_mocked_ab_partition_detector + _GrubABPartitionDetector_path, return_value=_mocked_ab_partition_detector ) # patch SlotMountHelper _SlotMountHelper_path = f"{cfg.GRUB_MODULE_PATH}.SlotMountHelper"