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:30:36 -0400 |
| commit | 1d807b91dc1ed1e423fb6d3e1e606e49abc46b34 (patch) | |
| tree | 1370d0d69275c87b5e58077e68451b3bdd8e7339 | |
| parent | b98fa241ddbb22507cb63886f697d25f43197cba (diff) | |
[2.0.x] Fixed a test failure with the latest GeoIP2 database.
Backport of 7a22d9f75125e3cfbea0979a876efe4634f6fe05 from master
| -rw-r--r-- | tests/gis_tests/test_geoip2.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/gis_tests/test_geoip2.py b/tests/gis_tests/test_geoip2.py index 05ccd05c25..df51ecfcd2 100644 --- a/tests/gis_tests/test_geoip2.py +++ b/tests/gis_tests/test_geoip2.py @@ -132,10 +132,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')) |
