Here tests: fix warning about legacy auth
test/geocoders/here.py::HereLegacyAuthTestCase::test_bbox
<...>/geopy/test/geocoders/here.py:267: UserWarning: Since December 2019 HERE provides two new authentication methods `API Key` and `OAuth 2.0`. `app_id`+`app_code` is deprecated and might eventually be phased out. Consider switching to `apikey`, which geopy supports. See
@@ -261,8 +261,11 @@ class HereLegacyAuthTestCase(BaseHereTestCase, GeocoderTestBase):
@classmethod
def make_geocoder(cls, **kwargs):
- return Here(
+ with warnings.catch_warnings(record=True) as w:
+ geocoder = Here(
app_id=env['HERE_APP_ID'],
app_code=env['HERE_APP_CODE'],
timeout=10,
)
+ assert len(w) == 1
+ return geocoder
