diff options
author | Tim Graham <timograham@gmail.com> | 2018-04-17 21:30:05 -0400 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2018-04-17 21:35:44 -0400 |
commit | 800778f7ad64a04401034f6b1005ec8071efc3bf (patch) | |
tree | ff645d9a460dded3ea036108e67174c3776c6652 | |
parent | 4a20aae4687df13bf4d81c120c57a88dfb468600 (diff) | |
download | django-800778f7ad64a04401034f6b1005ec8071efc3bf.tar.gz |
[1.11.x] Fixed a test failure with the latest GeoIP databases.
Backport of 7a22d9f75125e3cfbea0979a876efe4634f6fe05 from master
-rw-r--r-- | tests/gis_tests/test_geoip.py | 2 | ||||
-rw-r--r-- | tests/gis_tests/test_geoip2.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/gis_tests/test_geoip.py b/tests/gis_tests/test_geoip.py index 36382bfb5d..fa0df950b6 100644 --- a/tests/gis_tests/test_geoip.py +++ b/tests/gis_tests/test_geoip.py @@ -145,7 +145,7 @@ class GeoIPTest(unittest.TestCase): fqdn = "messe-duesseldorf.com" if self._is_dns_available(fqdn): d = g.city(fqdn) - self.assertEqual('Essen', d['city']) + 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')) diff --git a/tests/gis_tests/test_geoip2.py b/tests/gis_tests/test_geoip2.py index a2a59a3de6..414d9e492b 100644 --- a/tests/gis_tests/test_geoip2.py +++ b/tests/gis_tests/test_geoip2.py @@ -137,10 +137,10 @@ class GeoIPTest(unittest.TestCase): @mock.patch('socket.gethostbyname') def test05_unicode_response(self, gethostbyname): "GeoIP strings should be properly encoded (#16553)." - gethostbyname.return_value = '191.252.51.69' + gethostbyname.return_value = '194.27.42.76' g = GeoIP2() - d = g.city('www.fasano.com.br') - self.assertEqual(d['city'], 'São José dos Campos') + d = g.city('nigde.edu.tr') + self.assertEqual('Niğde', d['city']) d = g.country('200.26.205.1') # Some databases have only unaccented countries self.assertIn(d['country_name'], ('Curaçao', 'Curacao')) |