Package: django-countries / 6.0-1

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
33
34
35
36
37
38
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 | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/django_countries/tests/test_countries.py b/django_countries/tests/test_countries.py
index 3b7a096..fe0274f 100644
--- a/django_countries/tests/test_countries.py
+++ b/django_countries/tests/test_countries.py
@@ -140,8 +140,10 @@ class TestCountriesObject(BaseTest):
         self.assertEqual(code, 'US')
 
     def test_fetch_by_name_case_insensitive(self):
-        code = countries.by_name("United states of America")
-        self.assertEqual(code, "US")
+        #code = countries.by_name("United states of America")
+        #self.assertEqual(code, "US")
+        code = countries.by_name('United states')
+        self.assertEqual(code, 'US')
 
     def test_fetch_by_name_old(self):
         code = countries.by_name("Czech Republic")
@@ -152,8 +154,10 @@ 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("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"), "")