Allowing optional language for geocode.
The mapbox api allows to specify the language used
in geocoding results. The test executes a query, which
return the state and country name in German to verify
the implementation. This test is inspired by the Bing
culture reverse geocoding tests.
@@ -82,3 +82,11 @@ class TestMapBox(BaseTestGeocoder):
{},
)
assert len(list_result) >= 3
+
+ async def test_geocode_language(self):
+ res = await self.geocode_run(
+ {"query": "Frankfurt", "language": "DE"},
+ {}
+ )
+
+ assert "Frankfurt am Main, Hessen, Deutschland" in res.address
