20
20
"GeoIP is required along with the GEOIP_PATH setting."
21
21
)
22
22
class GeoIPTest (SimpleTestCase ):
23
- addr = '75.41.39 .1'
24
- fqdn = 'tmc .edu'
23
+ addr = '129.237.192 .1'
24
+ fqdn = 'ku .edu'
25
25
26
26
def test01_init (self ):
27
27
"GeoIP initialization."
@@ -105,7 +105,7 @@ def test03_country(self, gethostbyname):
105
105
@mock .patch ('socket.gethostbyname' )
106
106
def test04_city (self , gethostbyname ):
107
107
"GeoIP city querying methods."
108
- gethostbyname .return_value = '75.41.39 .1'
108
+ gethostbyname .return_value = '129.237.192 .1'
109
109
g = GeoIP2 (country = '<foo>' )
110
110
111
111
for query in (self .fqdn , self .addr ):
@@ -130,8 +130,8 @@ def test04_city(self, gethostbyname):
130
130
self .assertEqual ('NA' , d ['continent_code' ])
131
131
self .assertEqual ('North America' , d ['continent_name' ])
132
132
self .assertEqual ('US' , d ['country_code' ])
133
- self .assertEqual ('Dallas ' , d ['city' ])
134
- self .assertEqual ('TX ' , d ['region' ])
133
+ self .assertEqual ('Lawrence ' , d ['city' ])
134
+ self .assertEqual ('KS ' , d ['region' ])
135
135
self .assertEqual ('America/Chicago' , d ['time_zone' ])
136
136
self .assertFalse (d ['is_in_european_union' ])
137
137
geom = g .geos (query )
0 commit comments