Refactored person processing to enable implementation of #181

This commit is contained in:
Rhet Turnbull
2020-07-06 00:10:22 -07:00
parent dfcbfa725a
commit fcff8ec5f8
9 changed files with 197 additions and 59 deletions

View File

@@ -1,6 +1,6 @@
import pytest
# TODO: put some of this code into a pre-function
from osxphotos._constants import _UNKNOWN_PERSON
PHOTOS_DB = "./tests/Test-10.13.6.photoslibrary/database/photos.db"
KEYWORDS = [
@@ -14,7 +14,7 @@ KEYWORDS = [
"UK",
"United Kingdom",
]
PERSONS = ["Katie", "Suzy", "Maria"]
PERSONS = ["Katie", "Suzy", "Maria", _UNKNOWN_PERSON]
ALBUMS = ["Pumpkin Farm", "AlbumInFolder", "TestAlbum"]
KEYWORDS_DICT = {
"Kids": 4,
@@ -27,7 +27,7 @@ KEYWORDS_DICT = {
"UK": 1,
"United Kingdom": 1,
}
PERSONS_DICT = {"Katie": 3, "Suzy": 2, "Maria": 1}
PERSONS_DICT = {"Katie": 3, "Suzy": 2, "Maria": 1, _UNKNOWN_PERSON: 1}
ALBUM_DICT = {"Pumpkin Farm": 3, "TestAlbum": 1, "AlbumInFolder": 1}