diff --git a/elodie/tests/files/with-location-inv.jpg b/elodie/tests/files/with-location-inv.jpg new file mode 100644 index 0000000..2cada4a Binary files /dev/null and b/elodie/tests/files/with-location-inv.jpg differ diff --git a/elodie/tests/media/photo_test.py b/elodie/tests/media/photo_test.py index 831254f..156a82d 100644 --- a/elodie/tests/media/photo_test.py +++ b/elodie/tests/media/photo_test.py @@ -65,12 +65,24 @@ def test_get_coordinate_latitude(): assert coordinate == 37.3667027222, coordinate +def test_get_coordinate_latitude_minus(): + photo = Photo(helper.get_file('with-location-inv.jpg')) + coordinate = photo.get_coordinate('latitude') + + assert coordinate == -37.3667027222, coordinate + def test_get_coordinate_longitude(): photo = Photo(helper.get_file('with-location.jpg')) coordinate = photo.get_coordinate('longitude') assert coordinate == -122.033383611, coordinate +def test_get_coordinate_longitude_plus(): + photo = Photo(helper.get_file('with-location-inv.jpg')) + coordinate = photo.get_coordinate('longitude') + + assert coordinate == 122.033383611, coordinate + def test_get_coordinates_without_exif(): photo = Photo(helper.get_file('no-exif.jpg')) latitude = photo.get_coordinate('latitude')