1919 "GeoIP is required along with the GEOIP_PATH setting."
2020)
2121class 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