Added isreference property and --is-reference, #321

This commit is contained in:
Rhet Turnbull
2021-01-15 21:20:08 -08:00
parent 248c95237c
commit 651ed50a07
10 changed files with 191 additions and 265 deletions

View File

@@ -198,6 +198,9 @@ ORIGINAL_FILENAME_DICT = {
"original_filename": "Pumkins2.jpg",
}
UUID_IS_REFERENCE = "A1DD1F98-2ECD-431F-9AC9-5AFEFE2D3A5C"
UUID_NOT_REFERENCE = "F12384F6-CD17-4151-ACBA-AE0E3688539E"
@pytest.fixture(scope="module")
def photosdb():
@@ -1185,3 +1188,11 @@ def test_visible_burst(photosdb_local):
assert photo.burst
assert len(photo.burst_photos) == 4
def test_is_reference(photosdb):
""" test isreference """
photo = photosdb.get_photo(UUID_IS_REFERENCE)
assert photo.isreference
photo = photosdb.get_photo(UUID_NOT_REFERENCE)
assert not photo.isreference