summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2015-06-25 21:47:54 +0200
committerTim Graham <timograham@gmail.com>2015-07-30 18:17:13 -0400
commit9efddb7f3e023b8237e9b47e89ac956b4b728fd8 (patch)
tree0d4d3bffea9ddcd731a9a50f7b667aeaff7f0661
parent4fc5b487a8c23820240d70f334e612a7fcc33771 (diff)
downloaddjango-9efddb7f3e023b8237e9b47e89ac956b4b728fd8.tar.gz
[1.7.x] Updated GeoIP test for newer versions
Backport of 3f9dca62cb31a2b4b279b7d312a850660d21e91f from master
-rw-r--r--django/contrib/gis/geoip/tests.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/django/contrib/gis/geoip/tests.py b/django/contrib/gis/geoip/tests.py
index 589f9f7e93..7d6480191e 100644
--- a/django/contrib/gis/geoip/tests.py
+++ b/django/contrib/gis/geoip/tests.py
@@ -114,7 +114,8 @@ class GeoIPTest(unittest.TestCase):
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'))