Skip to content

Commit ee9d623

Browse files
committed
[2.2.x] Fixed GeoIPTest.test04_city() failure with the latest GeoIP2 database.
Backport of 135c800 from master
1 parent e8e28e7 commit ee9d623

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/gis_tests/test_geoip2.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"GeoIP is required along with the GEOIP_PATH setting."
2020
)
2121
class GeoIPTest(SimpleTestCase):
22-
addr = '75.41.39.1'
23-
fqdn = 'tmc.edu'
22+
addr = '129.237.192.1'
23+
fqdn = 'ku.edu'
2424

2525
def test01_init(self):
2626
"GeoIP initialization."
@@ -99,7 +99,7 @@ def test03_country(self, gethostbyname):
9999
@mock.patch('socket.gethostbyname')
100100
def test04_city(self, gethostbyname):
101101
"GeoIP city querying methods."
102-
gethostbyname.return_value = '75.41.39.1'
102+
gethostbyname.return_value = '129.237.192.1'
103103
g = GeoIP2(country='<foo>')
104104

105105
for query in (self.fqdn, self.addr):
@@ -124,8 +124,8 @@ def test04_city(self, gethostbyname):
124124
self.assertEqual('NA', d['continent_code'])
125125
self.assertEqual('North America', d['continent_name'])
126126
self.assertEqual('US', d['country_code'])
127-
self.assertEqual('Dallas', d['city'])
128-
self.assertEqual('TX', d['region'])
127+
self.assertEqual('Lawrence', d['city'])
128+
self.assertEqual('KS', d['region'])
129129
self.assertEqual('America/Chicago', d['time_zone'])
130130
geom = g.geos(query)
131131
self.assertIsInstance(geom, GEOSGeometry)

0 commit comments

Comments
 (0)