diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-06-27 15:09:28 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-06-30 20:21:27 +0200 |
| commit | bc5febec4ed3d3008c31dc0f4eb72e9f02f00781 (patch) | |
| tree | d27d68d08655efe19de09f150e379bae1d5cef18 | |
| parent | 790696836fed1302c67fd091e0d23466b9bb182b (diff) | |
[1.11.x] Fixed GeoIPTest.test04_city() failure with the latest GeoIP2 database.
Backport of 4305fbe8b11f44ab5d6759346488026c1e9677b2 from master.
| -rw-r--r-- | tests/gis_tests/test_geoip2.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/gis_tests/test_geoip2.py b/tests/gis_tests/test_geoip2.py index b15d0fc6ee..38f80952d2 100644 --- a/tests/gis_tests/test_geoip2.py +++ b/tests/gis_tests/test_geoip2.py @@ -24,7 +24,7 @@ if HAS_GEOIP2: "GeoIP is required along with the GEOIP_PATH setting." ) class GeoIPTest(unittest.TestCase): - addr = '128.249.1.1' + addr = '75.41.39.1' fqdn = 'tmc.edu' def test01_init(self): @@ -99,7 +99,7 @@ class GeoIPTest(unittest.TestCase): @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): @@ -122,7 +122,7 @@ class GeoIPTest(unittest.TestCase): # City information dictionary. d = g.city(query) self.assertEqual('US', d['country_code']) - self.assertEqual('Houston', d['city']) + self.assertEqual('Dallas', d['city']) self.assertEqual('TX', d['region']) geom = g.geos(query) |
