adding CI url for google_reverse
@@ -28,9 +28,15 @@ def test_google():
def test_google_reverse():
- url = 'https://maps.googleapis.com/maps/api/geocode/json?language=&latlng=45.4215296%2C+-75.697193&sensor=false&key=mock'
+ urls = [
+ # when testing locally
+ 'https://maps.googleapis.com/maps/api/geocode/json?language=&latlng=45.4215296%2C+-75.697193&sensor=false&key=mock',
+ # when building in Travis (secured connection implies ordered parameters)
+ 'https://maps.googleapis.com/maps/api/geocode/json?client=[secure]&latlng=45.4215296%2C+-75.697193&sensor=false&signature=iXbq6odmrYN0XgcfB5EPcgEvR-I%3D',
+ ]
data_file = 'tests/results/google_reverse.json'
with requests_mock.Mocker() as mocker, open(data_file, 'r') as input:
+ for url in urls:
mocker.get(url, text=input.read())
g = geocoder.google(ottawa, method='reverse', key='mock')
assert g.ok
