Skip to content

Commit

Permalink
Geolake tests: fix failing country_codes tests
Browse files Browse the repository at this point in the history
They stopped returning `Toronto` from US.
  • Loading branch information
KostyaEsmukov committed Jul 4, 2020
1 parent c853031 commit 0e82cef
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions test/geocoders/geolake.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,24 @@ def test_geocode(self):

def test_geocode_country_codes_str(self):
self.geocode_run(
{"query": "Toronto", "country_codes": "US"},
{"latitude": 40.46, "longitude": -80.6, "address": "Toronto, US"},
{"query": "Toronto", "country_codes": "CA"},
{"latitude": 43.72, "longitude": -79.47, "address": "Toronto, CA"},
)
self.geocode_run(
{"query": "Toronto", "country_codes": "RU"},
{},
expect_failure=True
)

def test_geocode_country_codes_list(self):
self.geocode_run(
{"query": "Toronto", "country_codes": ["CN", "US"]},
{"latitude": 40.46, "longitude": -80.6, "address": "Toronto, US"},
{"query": "Toronto", "country_codes": ["CA", "RU"]},
{"latitude": 43.72, "longitude": -79.47, "address": "Toronto, CA"},
)
self.geocode_run(
{"query": "Toronto", "country_codes": ["UA", "RU"]},
{},
expect_failure=True
)

def test_geocode_structured(self):
Expand Down

0 comments on commit 0e82cef

Please sign in to comment.