def test_get_coordinates_without_exif(): photo = Photo(helper.get_file('no-exif.jpg')) latitude = photo.get_coordinate('latitude') longitude = photo.get_coordinate('longitude') assert latitude is None, latitude assert longitude is None, longitude
def test_get_coordinates_with_null_coordinate(): photo = Photo(helper.get_file('with-null-coordinates.jpg')) latitude = photo.get_coordinate('latitude') longitude = photo.get_coordinate('longitude') assert latitude is None, latitude assert longitude is None, longitude
def test_get_coordinates_with_zero_coordinate(): photo = Photo(helper.get_file('with-location-zero-coordinate.jpg')) latitude = photo.get_coordinate('latitude') longitude = photo.get_coordinate('longitude') assert helper.isclose(latitude, 51.55325), latitude assert helper.isclose(longitude, -0.00417777777778), longitude
def test_get_coordinate_longitude_plus(): photo = Photo(helper.get_file('with-location-inv.jpg')) coordinate = photo.get_coordinate('longitude') assert helper.isclose(coordinate,122.033383611), coordinate
def test_get_coordinate_latitude_minus(): photo = Photo(helper.get_file('with-location-inv.jpg')) coordinate = photo.get_coordinate('latitude') assert helper.isclose(coordinate,-37.3667027222), coordinate
def test_get_coordinate_default(): photo = Photo(helper.get_file('with-location.jpg')) coordinate = photo.get_coordinate() assert helper.isclose(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_latitude(): photo = Photo(helper.get_file('with-location.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_latitude(): photo = Photo(helper.get_file("with-location.jpg")) coordinate = photo.get_coordinate("latitude") assert coordinate == 37.3667027222, coordinate