Exemplo n.º 1
0
def test_check_dir_invalid_path():
    print("test_check_dir_invalid_path():")

    fake_folder_path = "/fake/folder"
    assert(not image_downloader.check_dir(fake_folder_path))

    fake_folder = "../fake/folder"
    assert(not image_downloader.check_dir(fake_folder))
Exemplo n.º 2
0
def test_check_dir_valid_path():
    print("test_check_dir_valid_path():")

    # Check with existent folder
    path = get_path_to_folder_for_images()
    assert(image_downloader.check_dir(path))

    # Check with non existent folder
    remove_folder(path)
    assert(image_downloader.check_dir(path))
    remove_folder(path)