コード例 #1
0
async def test_existing_folder_already_exists(time, drive: DriveSource, config: Config, folder_finder: FolderFinder):
    await drive.get()
    drive.checkBeforeChanges()

    # Reset folder, try again
    folder_finder.reset()
    await drive.get()
    with pytest.raises(ExistingBackupFolderError):
        drive.checkBeforeChanges()
コード例 #2
0
async def test_existing_resolved_create_new(time, drive: DriveSource, config: Config, folder_finder: FolderFinder):
    await drive.get()
    drive.checkBeforeChanges()

    folder_id = await drive.getFolderId()

    # Reset folder, try again
    folder_finder.reset()
    await drive.get()
    with pytest.raises(ExistingBackupFolderError):
        drive.checkBeforeChanges()

    folder_finder.resolveExisting(False)
    await drive.get()
    drive.checkBeforeChanges()
    assert await drive.getFolderId() != folder_id