1
0
mirror of https://github.com/django/django.git synced 2024-12-28 20:16:19 +00:00

[1.8.x] Updated GeoIP test for newer versions

Backport of 3f9dca62cb from master
This commit is contained in:
Claude Paroz 2015-06-25 21:47:54 +02:00 committed by Tim Graham
parent 77566dcc6e
commit 22e9c87bb8

View File

@ -113,7 +113,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'))