fixed PhotoInfo.date() to account for timezone, updated tests
This commit is contained in:
BIN
tests/Test-10.14.5.photoslibrary/database/photos.db-shm
Normal file
BIN
tests/Test-10.14.5.photoslibrary/database/photos.db-shm
Normal file
Binary file not shown.
@@ -116,7 +116,7 @@ def test_attributes():
|
||||
p = photos[0]
|
||||
assert p.keywords() == ["Kids"]
|
||||
assert p.filename() == "Pumkins2.jpg"
|
||||
assert p.date() == datetime.datetime(2018, 9, 28, 16, 7, 7)
|
||||
assert p.date() == datetime.datetime(2018, 9, 28, 16, 7, 7,0,datetime.timezone(datetime.timedelta(seconds=-14400)))
|
||||
assert p.description() == "Girl holding pumpkin"
|
||||
assert p.name() == "I found one!"
|
||||
assert p.albums() == ["Pumpkin Farm"]
|
||||
|
||||
@@ -116,7 +116,7 @@ def test_attributes():
|
||||
p = photos[0]
|
||||
assert p.keywords() == ["Kids"]
|
||||
assert p.filename() == "Pumkins2.jpg"
|
||||
assert p.date() == datetime.datetime(2018, 9, 28, 16, 7, 7)
|
||||
assert p.date() == datetime.datetime(2018, 9, 28, 16, 7, 7,0,datetime.timezone(datetime.timedelta(seconds=-14400)))
|
||||
assert p.description() == "Girl holding pumpkin"
|
||||
assert p.name() == "I found one!"
|
||||
assert p.albums() == ["Pumpkin Farm"]
|
||||
|
||||
@@ -116,7 +116,7 @@ def test_attributes():
|
||||
p = photos[0]
|
||||
assert p.keywords() == ["Kids"]
|
||||
assert p.filename() == "Pumkins2.jpg"
|
||||
assert p.date() == datetime.datetime(2018, 9, 28, 16, 7, 7)
|
||||
assert p.date() == datetime.datetime(2018, 9, 28, 16, 7, 7,0,datetime.timezone(datetime.timedelta(seconds=-14400)))
|
||||
assert p.description() == "Girl holding pumpkin"
|
||||
assert p.name() == "I found one!"
|
||||
assert p.albums() == ["Pumpkin Farm"]
|
||||
|
||||
Reference in New Issue
Block a user