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.14.6.photoslibrary/database/photos.db"
PHOTOS_DB_PATH = "/Test-10.14.6.photoslibrary/database/photos.db"
@@ -17,7 +17,7 @@ KEYWORDS = [
"UK",
"United Kingdom",
]
PERSONS = ["Katie", "Suzy", "Maria"]
PERSONS = ["Katie", "Suzy", "Maria", _UNKNOWN_PERSON]
ALBUMS = ["Pumpkin Farm", "AlbumInFolder", "Test Album", "Test Album (1)"]
KEYWORDS_DICT = {
"Kids": 4,
@@ -30,7 +30,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,
"AlbumInFolder": 1,