def test_geocoding_by_place_name(self, client, mock_response): url = '/geocoding_by_place_name' response = client.get(url) assert response.status_code == 400 # we send the query with no parameters response = client.get(url+'?place_name=testing') assert response.status_code == 200 assert json.loads(response.data) == MockResponse.json()
def test_get_place_name_by_coordenates(self, client, mock_response): url = '/geocoding_by_coordenates' response = client.get(url) assert response.status_code == 400 # we send the query witn no parameters response = client.get(url+'?lat=5.456456&lng=72.5465487') assert response.status_code == 200 assert json.loads(response.data) == MockResponse.json()