19
19
"GeoIP is required along with the GEOIP_PATH setting."
20
20
)
21
21
class GeoIPTest (SimpleTestCase ):
22
- addr = '75.41.39 .1'
23
- fqdn = 'tmc .edu'
22
+ addr = '129.237.192 .1'
23
+ fqdn = 'ku .edu'
24
24
25
25
def test01_init (self ):
26
26
"GeoIP initialization."
@@ -99,7 +99,7 @@ def test03_country(self, gethostbyname):
99
99
@mock .patch ('socket.gethostbyname' )
100
100
def test04_city (self , gethostbyname ):
101
101
"GeoIP city querying methods."
102
- gethostbyname .return_value = '75.41.39 .1'
102
+ gethostbyname .return_value = '129.237.192 .1'
103
103
g = GeoIP2 (country = '<foo>' )
104
104
105
105
for query in (self .fqdn , self .addr ):
@@ -124,8 +124,8 @@ def test04_city(self, gethostbyname):
124
124
self .assertEqual ('NA' , d ['continent_code' ])
125
125
self .assertEqual ('North America' , d ['continent_name' ])
126
126
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' ])
129
129
self .assertEqual ('America/Chicago' , d ['time_zone' ])
130
130
geom = g .geos (query )
131
131
self .assertIsInstance (geom , GEOSGeometry )
0 commit comments