diff --git a/elodie/media/photo.py b/elodie/media/photo.py index b070877..07f3e04 100644 --- a/elodie/media/photo.py +++ b/elodie/media/photo.py @@ -28,7 +28,7 @@ class Photo(Media): __name__ = 'Photo' #: Valid extensions for photo files. - extensions = ('arw', 'cr2', 'dng', 'gif', 'heic', 'jpeg', 'jpg', 'nef', 'rw2') + extensions = ('arw', 'cr2', 'dng', 'gif', 'heic', 'jpeg', 'jpg', 'nef', 'png', 'rw2') def __init__(self, source=None): super(Photo, self).__init__(source) diff --git a/elodie/tests/files/photo.png b/elodie/tests/files/photo.png new file mode 100644 index 0000000..3617569 Binary files /dev/null and b/elodie/tests/files/photo.png differ diff --git a/elodie/tests/media/photo_test.py b/elodie/tests/media/photo_test.py index 08019cb..dd391ee 100644 --- a/elodie/tests/media/photo_test.py +++ b/elodie/tests/media/photo_test.py @@ -35,6 +35,7 @@ def test_photo_extensions(): assert 'jpg' in extensions assert 'jpeg' in extensions assert 'nef' in extensions + assert 'png' in extensions assert 'rw2' in extensions valid_extensions = Photo.get_valid_extensions() @@ -355,6 +356,7 @@ def test_various_types(): 'dng': (2009, 10, 20, 9, 10, 46, 1, 293, 0), 'heic': (2019, 5, 26, 10, 33, 20, 6, 146, 0), 'nef': (2008, 10, 24, 9, 12, 56, 4, 298, 0), + 'png': (2015, 1, 18, 12, 1, 1, 6, 18, 0), 'rw2': (2014, 11, 19, 23, 7, 44, 2, 323, 0) }