diff --git a/cloudbaseinit/tests/metadata/services/test_ec2service.py b/cloudbaseinit/tests/metadata/services/test_ec2service.py index 2ce38df0..7ff45572 100644 --- a/cloudbaseinit/tests/metadata/services/test_ec2service.py +++ b/cloudbaseinit/tests/metadata/services/test_ec2service.py @@ -42,7 +42,7 @@ class EC2ServiceTest(unittest.TestCase): response = self._service.load() mock_check_metadata_ip_route.assert_called_once_with( CONF.ec2_metadata_base_url) - mock_get_host_name.assert_called_once() + mock_get_host_name.assert_called_once_with() if side_effect is Exception: self.assertFalse(response) else: diff --git a/cloudbaseinit/tests/metadata/services/test_opennebulaservice.py b/cloudbaseinit/tests/metadata/services/test_opennebulaservice.py index 149df3b7..bd9e600c 100644 --- a/cloudbaseinit/tests/metadata/services/test_opennebulaservice.py +++ b/cloudbaseinit/tests/metadata/services/test_opennebulaservice.py @@ -209,8 +209,9 @@ class TestOpenNebulaService(_TestOpenNebulaService): if level > 1: (mock_osutils.get_volume_label .assert_called_once_with(fakes["drive"])) - mock_os_path.join.assert_called_once() - mock_os_path.isfile.assert_called_once() + mock_os_path.join.assert_called_once_with( + "mount_point", opennebulaservice.CONTEXT_FILE) + mock_os_path.isfile.assert_called_once_with("fake_path") # check response and members if level in (1, 2): self.assertFalse(ret) diff --git a/cloudbaseinit/tests/osutils/test_windows.py b/cloudbaseinit/tests/osutils/test_windows.py index 382f7410..add21ad8 100644 --- a/cloudbaseinit/tests/osutils/test_windows.py +++ b/cloudbaseinit/tests/osutils/test_windows.py @@ -1404,7 +1404,7 @@ class TestWindowsUtils(testutils.CloudbaseInitTestBase): response = self._winutils.get_dhcp_hosts_in_use() - mock_get_adapter_addresses.assert_called() + mock_get_adapter_addresses.assert_called_once_with() self.assertEqual([('fake mac address', 'fake dhcp server')], response) @mock.patch('cloudbaseinit.osutils.windows.WindowsUtils' diff --git a/cloudbaseinit/tests/test_init.py b/cloudbaseinit/tests/test_init.py index a3f7e5fe..f16932a8 100644 --- a/cloudbaseinit/tests/test_init.py +++ b/cloudbaseinit/tests/test_init.py @@ -155,7 +155,7 @@ class InitManagerTest(unittest.TestCase): self._init.configure_host() - self.osutils.wait_for_boot_completion.assert_called_once() + self.osutils.wait_for_boot_completion.assert_called_once_with() mock_get_metadata_service.assert_called_once_with() fake_service.get_name.assert_called_once_with() mock_check_os_requirements.assert_called_once_with(self.osutils,