Updated PhotosAlbum code

This commit is contained in:
Rhet Turnbull
2022-09-02 18:07:09 -07:00
parent fe514e79ab
commit d5a9001661
5 changed files with 72 additions and 60 deletions

View File

@@ -206,7 +206,7 @@ def copy_photos_library(photos_library, delay=0):
@pytest.fixture
def addalbum_library():
copy_photos_library(delay=10)
copy_photos_library(TEST_LIBRARY, delay=10)
def copy_photos_library_to_path(photos_library_path: str, dest_path: str) -> str:

View File

@@ -38,8 +38,8 @@ def test_export_add_to_album(addalbum_library):
],
)
assert result.exit_code == 0
assert f"Creating Photos album '{EXPORT_ALBUM}'" in result.output
assert f"Creating Photos album '{SKIP_ALBUM}'" in result.output
assert f"Creating album '{EXPORT_ALBUM}'" in result.output
assert f"Creating album '{SKIP_ALBUM}'" in result.output
photoslib = photoscript.PhotosLibrary()
album = photoslib.album(EXPORT_ALBUM)
@@ -69,9 +69,9 @@ def test_export_add_to_album(addalbum_library):
],
)
assert result.exit_code == 0
assert f"Creating Photos album '{EXPORT_ALBUM}'" not in result.output
assert f"Creating Photos album '{SKIP_ALBUM}'" not in result.output
assert f"Creating Photos album '{MISSING_ALBUM}'" in result.output
assert f"Creating album '{EXPORT_ALBUM}'" not in result.output
assert f"Creating album '{SKIP_ALBUM}'" not in result.output
assert f"Creating album '{MISSING_ALBUM}'" in result.output
photoslib = photoscript.PhotosLibrary()
export_album = photoslib.album(EXPORT_ALBUM)