Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed some a stale location and whitespace in GeoIP tests.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14416 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1ee4274ff13b0b6cef32cb3035376dfd7144f35c 1 parent 315ae1c
Justin Bronn authored November 01, 2010

Showing 1 changed file with 8 additions and 8 deletions. Show diff stats Hide diff stats

  1. 16  django/contrib/gis/tests/test_geoip.py
16  django/contrib/gis/tests/test_geoip.py
@@ -5,10 +5,10 @@
5 5
 
6 6
 # Note: Requires use of both the GeoIP country and city datasets.
7 7
 # The GEOIP_DATA path should be the only setting set (the directory
8  
-# should contain links or the actual database files 'GeoIP.dat' and 
  8
+# should contain links or the actual database files 'GeoIP.dat' and
9 9
 # 'GeoLiteCity.dat'.
10 10
 class GeoIPTest(unittest.TestCase):
11  
-    
  11
+
12 12
     def test01_init(self):
13 13
         "Testing GeoIP initialization."
14 14
         g1 = GeoIP() # Everything inferred from GeoIP path
@@ -19,7 +19,7 @@ def test01_init(self):
19 19
         for g in (g1, g2, g3):
20 20
             self.assertEqual(True, bool(g._country))
21 21
             self.assertEqual(True, bool(g._city))
22  
-        
  22
+
23 23
         # Only passing in the location of one database.
24 24
         city = os.path.join(path, 'GeoLiteCity.dat')
25 25
         cntry = os.path.join(path, 'GeoIP.dat')
@@ -52,10 +52,10 @@ def test02_bad_query(self):
52 52
     def test03_country(self):
53 53
         "Testing GeoIP country querying methods."
54 54
         g = GeoIP(city='<foo>')
55  
-        
  55
+
56 56
         fqdn = 'www.google.com'
57 57
         addr = '12.215.42.19'
58  
-        
  58
+
59 59
         for query in (fqdn, addr):
60 60
             for func in (g.country_code, g.country_code_by_addr, g.country_code_by_name):
61 61
                 self.assertEqual('US', func(query))
@@ -67,7 +67,7 @@ def test03_country(self):
67 67
     def test04_city(self):
68 68
         "Testing GeoIP city querying methods."
69 69
         g = GeoIP(country='<foo>')
70  
-        
  70
+
71 71
         addr = '130.80.29.3'
72 72
         fqdn = 'chron.com'
73 73
         for query in (fqdn, addr):
@@ -78,7 +78,7 @@ def test04_city(self):
78 78
                 self.assertEqual('United States', func(query))
79 79
             self.assertEqual({'country_code' : 'US', 'country_name' : 'United States'},
80 80
                              g.country(query))
81  
-            
  81
+
82 82
             # City information dictionary.
83 83
             d = g.city(query)
84 84
             self.assertEqual('USA', d['country_code3'])
@@ -87,7 +87,7 @@ def test04_city(self):
87 87
             self.assertEqual(713, d['area_code'])
88 88
             geom = g.geos(query)
89 89
             self.failIf(not isinstance(geom, GEOSGeometry))
90  
-            lon, lat = (-95.4152, 29.7755)
  90
+            lon, lat = (-95.3670, 29.7523)
91 91
             lat_lon = g.lat_lon(query)
92 92
             lat_lon = (lat_lon[1], lat_lon[0])
93 93
             for tup in (geom.tuple, g.coords(query), g.lon_lat(query), lat_lon):

0 notes on commit 1ee4274

Please sign in to comment.
Something went wrong with that request. Please try again.