def test_geo_metadata_CANADA(self): responses.add( responses.GET, self.geo_js_url, json=GEO_METADATA_CANADA, status=200 ) geo = GeoMetadata.from_geo_js(self.geo_js_url) self.assertEqual("CAN", geo.country_iso_code) self.assertEqual("Canada", geo.country_name)
def test_geo_metadata_USA(self): responses.add(responses.GET, self.geo_js_url, json=GEO_METADATA_USA, status=200) geo = GeoMetadata.from_geo_js(self.geo_js_url) self.assertEqual("USA", geo.country_iso_code) self.assertEqual("United States", geo.country_name) self.assertEqual("illinois", geo.region)
def _get_geo_metadata(self) -> GeoMetadata: return GeoMetadata.from_geo_js(self._data_source.geo_js_url)