Feature person favorite 940 (#950)
* Added person favorite for #940 * Added person.feature_less #940 (but not 100% sure it's right yet) * Added tests for PersonInfo.favorite, PersonInfo.feature_less
This commit is contained in:
@@ -240,6 +240,11 @@ UUID_FINGERPRINT = {
|
||||
"E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51": "ASs96bJvsunOg9Vxo5hK7VU3HegE"
|
||||
}
|
||||
|
||||
UUID_FAVORITE_PERSON = "E9BC5C36-7CD1-40A1-A72B-8B8FAC227D51" # wedding.jpg, Maria
|
||||
UUID_NOT_FAVORITE_PERSON = "D79B8D77-BFFC-460B-9312-034F2877D35B" # Pumkins2.jpg, Katie
|
||||
UUID_PERSON_FEATURE_LESS = UUID_NOT_FAVORITE_PERSON
|
||||
UUID_PERSON_NOT_FEATURE_LESS = UUID_FAVORITE_PERSON
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def photosdb():
|
||||
@@ -1250,3 +1255,21 @@ def test_fingerprint(photosdb):
|
||||
for uuid, fingerprint in UUID_FINGERPRINT.items():
|
||||
photo = photosdb.get_photo(uuid)
|
||||
assert photo.fingerprint == fingerprint
|
||||
|
||||
|
||||
def test_person_favorite(photosdb):
|
||||
"""Test person favorite"""
|
||||
photo = photosdb.get_photo(UUID_FAVORITE_PERSON)
|
||||
assert photo.person_info[0].favorite
|
||||
|
||||
photo = photosdb.get_photo(UUID_NOT_FAVORITE_PERSON)
|
||||
assert not photo.person_info[0].favorite
|
||||
|
||||
|
||||
def test_person_feature_less(photosdb):
|
||||
"""Test person feature less"""
|
||||
photo = photosdb.get_photo(UUID_PERSON_FEATURE_LESS)
|
||||
assert photo.person_info[0].feature_less
|
||||
|
||||
photo = photosdb.get_photo(UUID_PERSON_NOT_FEATURE_LESS)
|
||||
assert not photo.person_info[0].feature_less
|
||||
|
||||
Reference in New Issue
Block a user