Skip to content

Commit bc5febe

Browse files
committed
[1.11.x] Fixed GeoIPTest.test04_city() failure with the latest GeoIP2 database.
Backport of 4305fbe from master.
1 parent 7906968 commit bc5febe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/gis_tests/test_geoip2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"GeoIP is required along with the GEOIP_PATH setting."
2525
)
2626
class GeoIPTest(unittest.TestCase):
27-
addr = '128.249.1.1'
27+
addr = '75.41.39.1'
2828
fqdn = 'tmc.edu'
2929

3030
def test01_init(self):
@@ -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 = '128.249.1.1'
102+
gethostbyname.return_value = '75.41.39.1'
103103
g = GeoIP2(country='<foo>')
104104

105105
for query in (self.fqdn, self.addr):
@@ -122,7 +122,7 @@ def test04_city(self, gethostbyname):
122122
# City information dictionary.
123123
d = g.city(query)
124124
self.assertEqual('US', d['country_code'])
125-
self.assertEqual('Houston', d['city'])
125+
self.assertEqual('Dallas', d['city'])
126126
self.assertEqual('TX', d['region'])
127127

128128
geom = g.geos(query)

0 commit comments

Comments
 (0)