diff --git a/hyperv/tests/unit/test_livemigrationops.py b/hyperv/tests/unit/test_livemigrationops.py index 6c35f639..7ad01dc8 100644 --- a/hyperv/tests/unit/test_livemigrationops.py +++ b/hyperv/tests/unit/test_livemigrationops.py @@ -36,9 +36,8 @@ class LiveMigrationOpsTestCase(test_base.HyperVBaseTestCase): @mock.patch('hyperv.nova.serialconsoleops.SerialConsoleOps.' 'stop_console_handler') - @mock.patch('hyperv.nova.pathutils.PathUtils.copy_vm_console_logs') @mock.patch('hyperv.nova.vmops.VMOps.copy_vm_dvd_disks') - def _test_live_migration(self, mock_get_vm_dvd_paths, mock_copy_logs, + def _test_live_migration(self, mock_get_vm_dvd_paths, mock_stop_console_handler, side_effect): mock_instance = fake_instance.fake_instance_obj(self.context) mock_post = mock.MagicMock() @@ -62,6 +61,7 @@ class LiveMigrationOpsTestCase(test_base.HyperVBaseTestCase): mock_stop_console_handler.assert_called_once_with( mock_instance.name) + mock_copy_logs = self._livemigrops._pathutils.copy_vm_console_logs mock_copy_logs.assert_called_once_with(mock_instance.name, fake_dest) mock_live_migr = self._livemigrops._livemigrutils.live_migrate_vm diff --git a/hyperv/tests/unit/test_migrationops.py b/hyperv/tests/unit/test_migrationops.py index a159a62f..644286a5 100644 --- a/hyperv/tests/unit/test_migrationops.py +++ b/hyperv/tests/unit/test_migrationops.py @@ -77,7 +77,7 @@ class MigrationOpsTestCase(test_base.HyperVBaseTestCase): expected_get_dir) self._migrationops._pathutils.copy.assert_called_once_with( self._FAKE_DISK, fake_dest_path) - self._migrationops._pathutils.move_folder_contents.assert_has_calls( + self._migrationops._pathutils.move_folder_files.assert_has_calls( expected_move_calls) def test_migrate_disk_files(self): diff --git a/hyperv/tests/unit/test_vmops.py b/hyperv/tests/unit/test_vmops.py index 25c34953..5c1cb33f 100644 --- a/hyperv/tests/unit/test_vmops.py +++ b/hyperv/tests/unit/test_vmops.py @@ -1065,7 +1065,7 @@ class VMOpsTestCase(test_base.HyperVBaseTestCase): mock.sentinel.FAKE_DEST_PATH) self._vmops.copy_vm_dvd_disks(mock.sentinel.FAKE_VM_NAME, - mock.sentinel.FAKE_DEST) + mock.sentinel.FAKE_DEST_HOST) mock_get_dvd_disk_paths.assert_called_with(mock.sentinel.FAKE_VM_NAME) self._vmops._pathutils.get_instance_dir.assert_called_once_with(