Package: django-countries / 5.3.2-2

0003-Fix-tests-to-work-with-local-XML-data-from-iso-codes.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Michael Fladischer <FladischerMichael@fladi.at>
Date: Sun, 1 Apr 2018 10:52:56 +0200
Subject: Fix tests to work with local XML data from iso-codes package.

---
 django_countries/tests/test_countries.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/django_countries/tests/test_countries.py b/django_countries/tests/test_countries.py
index 7d76239..12c7050 100644
--- a/django_countries/tests/test_countries.py
+++ b/django_countries/tests/test_countries.py
@@ -128,7 +128,7 @@ class TestCountriesObject(BaseTest):
         self.assertEqual(code, 'US')
 
     def test_fetch_by_name_case_insensitive(self):
-        code = countries.by_name('United states of America')
+        code = countries.by_name('United states')
         self.assertEqual(code, 'US')
 
     def test_fetch_by_name_old(self):
@@ -140,8 +140,8 @@ class TestCountriesObject(BaseTest):
         self.assertEqual(code, 'CZ')
 
     def test_fetch_by_name_i18n(self):
-        code = countries.by_name('Estados Unidos', language='es')
-        self.assertEqual(code, 'US')
+        code = countries.by_name('Finlandia', language='es')
+        self.assertEqual(code, 'FI')
 
     def test_fetch_by_name_no_match(self):
         self.assertEqual(countries.by_name('Neverland'), '')