def test_send_stream_when_using_original_directory_and_the_same_device_guid_start_push_restore_with_expected_args( self, push_service, single_file_selection): restore_job_manager = RestoreJobManager(push_service, TEST_DEVICE_GUID, TEST_SESSION_ID) restore_job_manager.send_stream( PushRestoreLocation.ORIGINAL_LOCATION, TEST_NODE_GUID, TEST_DEVICE_GUID, single_file_selection, TEST_BACKUP_SET_ID, False, True, ) push_service.start_push_restore.assert_called_once_with( TEST_DEVICE_GUID, TEST_DEVICE_GUID, TEST_SESSION_ID, TEST_NODE_GUID, "", [{ "backupSetId": TEST_BACKUP_SET_ID, "files": [single_file_selection[0].file], }], 1, 1, show_deleted=False, file_location=PushRestoreLocation.ORIGINAL_LOCATION, existing_files=PushRestoreExistingFiles.OVERWRITE_ORIGINAL, permit_restore_to_different_os_version=False, )
def test_send_stream_calls_start_push_restore_with_expected_args( self, push_service, single_file_selection): restore_job_manager = RestoreJobManager(push_service, TEST_DEVICE_GUID, TEST_SESSION_ID) restore_job_manager.send_stream( TEST_RESTORE_PATH, TEST_NODE_GUID, TEST_ACCEPTING_GUID, single_file_selection, TEST_BACKUP_SET_ID, False, False, ) push_service.start_push_restore.assert_called_once_with( TEST_DEVICE_GUID, TEST_ACCEPTING_GUID, TEST_SESSION_ID, TEST_NODE_GUID, TEST_RESTORE_PATH, [{ "backupSetId": TEST_BACKUP_SET_ID, "files": [single_file_selection[0].file], }], 1, 1, show_deleted=False, file_location=None, existing_files=PushRestoreExistingFiles.RENAME_ORIGINAL, permit_restore_to_different_os_version=False, )