Updated GeoIP test for newer versions

This commit is contained in:
Claude Paroz 2015-06-25 21:47:54 +02:00
parent b43b27bcdf
commit 3f9dca62cb
1 changed files with 5 additions and 4 deletions

View File

@ -113,7 +113,8 @@ class GeoIPTest(unittest.TestCase):
def test05_unicode_response(self): def test05_unicode_response(self):
"Testing that GeoIP strings are properly encoded, see #16553." "Testing that GeoIP strings are properly encoded, see #16553."
g = GeoIP() g = GeoIP()
d = g.city("www.osnabrueck.de") d = g.city("duesseldorf.de")
self.assertEqual('Osnabrück', d['city']) self.assertEqual('Düsseldorf', d['city'])
d = g.country('200.7.49.81') d = g.country('200.26.205.1')
self.assertEqual('Curaçao', d['country_name']) # Some databases have only unaccented countries
self.assertIn(d['country_name'], ('Curaçao', 'Curacao'))