Skip to content

Commit

Permalink
tests added for inverted lattitude/logitude
Browse files Browse the repository at this point in the history
  • Loading branch information
zserg committed Dec 25, 2015
1 parent 7a6931d commit ea04b77
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Binary file added elodie/tests/files/with-location-inv.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions elodie/tests/media/photo_test.py
Expand Up @@ -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')
Expand Down

0 comments on commit ea04b77

Please sign in to comment.