summaryrefslogtreecommitdiff
path: root/tests/admin_scripts
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-10-22 19:37:03 -0400
committerTim Graham <timograham@gmail.com>2015-10-22 19:38:23 -0400
commit89359347c4e7be123dd99d13a43d75e8610ae1dc (patch)
tree7f55c4ad581a6e9f983753828cc73f72cfa55dd8 /tests/admin_scripts
parentf242ad27a444432e09ac4c454881d93d3dff2304 (diff)
Refs #25589 -- Fixed admin_scripts test failure on Windows.
Traceback (most recent call last): File "tests\admin_scripts\tests.py", line 646, in test_startapp_unicode_name content = f.read() File "lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 46: character maps to <undefined>
Diffstat (limited to 'tests/admin_scripts')
-rw-r--r--tests/admin_scripts/tests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index f2950f0ee6..755fb0b1d4 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -642,7 +642,7 @@ class DjangoAdminSettingsDirectory(AdminScriptTestCase):
self.addCleanup(shutil.rmtree, app_path)
self.assertNoOutput(err)
self.assertTrue(os.path.exists(app_path))
- with open(os.path.join(app_path, 'apps.py'), 'r') as f:
+ with open(os.path.join(app_path, 'apps.py'), 'r', encoding='utf8') as f:
content = f.read()
self.assertIn("class こんにちはConfig(AppConfig)", content)
self.assertIn("name = 'こんにちは'", content)