Skip to content

Commit

Permalink
[1.7.x] Updated GeoIP test for newer versions
Browse files Browse the repository at this point in the history
Backport of 3f9dca6 from master
  • Loading branch information
claudep authored and timgraham committed Jul 30, 2015
1 parent 4fc5b48 commit 9efddb7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions django/contrib/gis/geoip/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ def test04_city(self):
def test05_unicode_response(self):
"Testing that GeoIP strings are properly encoded, see #16553."
g = GeoIP()
d = g.city("www.osnabrueck.de")
self.assertEqual('Osnabrück', d['city'])
d = g.country('200.7.49.81')
self.assertEqual('Curaçao', d['country_name'])
d = g.city("duesseldorf.de")
self.assertEqual('Düsseldorf', d['city'])
d = g.country('200.26.205.1')
# Some databases have only unaccented countries
self.assertIn(d['country_name'], ('Curaçao', 'Curacao'))

0 comments on commit 9efddb7

Please sign in to comment.