summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2021-01-29 11:00:12 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-01-29 11:03:59 +0100
commitee9d623831681b7130565e4d58933861a660a82f (patch)
tree67146cd9c93cc26aa5fd8455d426eee471abe1f8
parente8e28e747f0d9332df62dc706d7ffb07779d0c3b (diff)
[2.2.x] Fixed GeoIPTest.test04_city() failure with the latest GeoIP2 database.
Backport of 135c800fe6138d7818501a384c0ebbdc5442762c from master
-rw-r--r--tests/gis_tests/test_geoip2.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/gis_tests/test_geoip2.py b/tests/gis_tests/test_geoip2.py
index 54f8aa00b0..930a925007 100644
--- a/tests/gis_tests/test_geoip2.py
+++ b/tests/gis_tests/test_geoip2.py
@@ -19,8 +19,8 @@ if HAS_GEOIP2:
"GeoIP is required along with the GEOIP_PATH setting."
)
class GeoIPTest(SimpleTestCase):
- addr = '75.41.39.1'
- fqdn = 'tmc.edu'
+ addr = '129.237.192.1'
+ fqdn = 'ku.edu'
def test01_init(self):
"GeoIP initialization."
@@ -99,7 +99,7 @@ class GeoIPTest(SimpleTestCase):
@mock.patch('socket.gethostbyname')
def test04_city(self, gethostbyname):
"GeoIP city querying methods."
- gethostbyname.return_value = '75.41.39.1'
+ gethostbyname.return_value = '129.237.192.1'
g = GeoIP2(country='<foo>')
for query in (self.fqdn, self.addr):
@@ -124,8 +124,8 @@ class GeoIPTest(SimpleTestCase):
self.assertEqual('NA', d['continent_code'])
self.assertEqual('North America', d['continent_name'])
self.assertEqual('US', d['country_code'])
- self.assertEqual('Dallas', d['city'])
- self.assertEqual('TX', d['region'])
+ self.assertEqual('Lawrence', d['city'])
+ self.assertEqual('KS', d['region'])
self.assertEqual('America/Chicago', d['time_zone'])
geom = g.geos(query)
self.assertIsInstance(geom, GEOSGeometry)