summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2019-06-27 15:09:28 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-06-30 20:17:44 +0200
commit757c226fd6f6e68116a2bbffab9c7367e11e3ed8 (patch)
tree59059efd00cb177a6aca91bf6a618a248bc2d712
parent20968e3eaee8977da3003e18f09acc3741567814 (diff)
[2.1.x] Fixed GeoIPTest.test04_city() failure with the latest GeoIP2 database.
Backport of 4305fbe8b11f44ab5d6759346488026c1e9677b2 from master
-rw-r--r--tests/gis_tests/test_geoip2.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/gis_tests/test_geoip2.py b/tests/gis_tests/test_geoip2.py
index 9813f384ed..54f8aa00b0 100644
--- a/tests/gis_tests/test_geoip2.py
+++ b/tests/gis_tests/test_geoip2.py
@@ -19,7 +19,7 @@ if HAS_GEOIP2:
"GeoIP is required along with the GEOIP_PATH setting."
)
class GeoIPTest(SimpleTestCase):
- addr = '128.249.1.1'
+ addr = '75.41.39.1'
fqdn = 'tmc.edu'
def test01_init(self):
@@ -99,7 +99,7 @@ class GeoIPTest(SimpleTestCase):
@mock.patch('socket.gethostbyname')
def test04_city(self, gethostbyname):
"GeoIP city querying methods."
- gethostbyname.return_value = '128.249.1.1'
+ gethostbyname.return_value = '75.41.39.1'
g = GeoIP2(country='<foo>')
for query in (self.fqdn, self.addr):
@@ -124,7 +124,7 @@ class GeoIPTest(SimpleTestCase):
self.assertEqual('NA', d['continent_code'])
self.assertEqual('North America', d['continent_name'])
self.assertEqual('US', d['country_code'])
- self.assertEqual('Houston', d['city'])
+ self.assertEqual('Dallas', d['city'])
self.assertEqual('TX', d['region'])
self.assertEqual('America/Chicago', d['time_zone'])
geom = g.geos(query)