@@ -188,6 +188,10 @@ UUID_MOMENT = {
|
||||
}
|
||||
}
|
||||
|
||||
UUID_FINGERPRINT = {
|
||||
"E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51": "ASs96bJvsunOg9Vxo5hK7VU3HegE"
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def photosdb():
|
||||
@@ -1153,3 +1157,10 @@ def test_moment(photosdb, info):
|
||||
assert photo.moment_info.end_date.isoformat() == info["end_date"]
|
||||
assert photo.moment_info.date.isoformat() == info["date"]
|
||||
assert photo.moment_info.modification_date.isoformat() == info["modification_date"]
|
||||
|
||||
|
||||
def test_fingerprint(photosdb):
|
||||
"""Test fingerprint"""
|
||||
for uuid, fingerprint in UUID_FINGERPRINT.items():
|
||||
photo = photosdb.get_photo(uuid)
|
||||
assert photo.fingerprint == fingerprint
|
||||
|
||||
@@ -272,6 +272,10 @@ UUID_MOMENT = {
|
||||
}
|
||||
}
|
||||
|
||||
UUID_FINGERPRINT = {
|
||||
"E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51": "ASs96bJvsunOg9Vxo5hK7VU3HegE"
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def photosdb():
|
||||
@@ -1487,3 +1491,10 @@ def test_moment(photosdb, info):
|
||||
assert photo.moment_info.end_date.isoformat() == info["end_date"]
|
||||
assert photo.moment_info.date.isoformat() == info["date"]
|
||||
assert photo.moment_info.modification_date.isoformat() == info["modification_date"]
|
||||
|
||||
|
||||
def test_fingerprint(photosdb):
|
||||
"""Test fingerprint"""
|
||||
for uuid, fingerprint in UUID_FINGERPRINT.items():
|
||||
photo = photosdb.get_photo(uuid)
|
||||
assert photo.fingerprint == fingerprint
|
||||
|
||||
@@ -160,6 +160,9 @@ RAW_DICT = {
|
||||
}
|
||||
|
||||
|
||||
UUID_FINGERPRINT = {"6bxcNnzRQKGnK4uPrCJ9UQ": "ASs96bJvsunOg9Vxo5hK7VU3HegE"}
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def photosdb():
|
||||
import osxphotos
|
||||
@@ -675,3 +678,10 @@ def test_no_adjustments(photosdb):
|
||||
|
||||
photo = photosdb.get_photo(UUID_DICT["no_adjustments"])
|
||||
assert photo.adjustments is None
|
||||
|
||||
|
||||
def test_fingerprint(photosdb):
|
||||
"""Test fingerprint"""
|
||||
for uuid, fingerprint in UUID_FINGERPRINT.items():
|
||||
photo = photosdb.get_photo(uuid)
|
||||
assert photo.fingerprint == fingerprint
|
||||
|
||||
@@ -194,6 +194,11 @@ UUID_MOMENT = {
|
||||
}
|
||||
|
||||
|
||||
UUID_FINGERPRINT = {
|
||||
"E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51": "ASs96bJvsunOg9Vxo5hK7VU3HegE"
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def photosdb():
|
||||
return osxphotos.PhotosDB(dbfile=PHOTOS_DB)
|
||||
@@ -1158,3 +1163,10 @@ def test_moment(photosdb, info):
|
||||
assert photo.moment_info.end_date.isoformat() == info["end_date"]
|
||||
assert photo.moment_info.date.isoformat() == info["date"]
|
||||
assert photo.moment_info.modification_date.isoformat() == info["modification_date"]
|
||||
|
||||
|
||||
def test_fingerprint(photosdb):
|
||||
"""Test fingerprint"""
|
||||
for uuid, fingerprint in UUID_FINGERPRINT.items():
|
||||
photo = photosdb.get_photo(uuid)
|
||||
assert photo.fingerprint == fingerprint
|
||||
|
||||
@@ -235,6 +235,11 @@ UUID_SEARCH_INFO = {
|
||||
}
|
||||
|
||||
|
||||
UUID_FINGERPRINT = {
|
||||
"E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51": "ASs96bJvsunOg9Vxo5hK7VU3HegE"
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def photosdb():
|
||||
return osxphotos.PhotosDB(dbfile=PHOTOS_DB)
|
||||
@@ -1233,3 +1238,10 @@ def test_search_info_dict(photosdb):
|
||||
for uuid, search_info in UUID_SEARCH_INFO.items():
|
||||
photo = photosdb.get_photo(uuid=uuid)
|
||||
assert photo.search_info.asdict() == search_info
|
||||
|
||||
|
||||
def test_fingerprint(photosdb):
|
||||
"""Test fingerprint"""
|
||||
for uuid, fingerprint in UUID_FINGERPRINT.items():
|
||||
photo = photosdb.get_photo(uuid)
|
||||
assert photo.fingerprint == fingerprint
|
||||
|
||||
Reference in New Issue
Block a user