From ce7293bc91e993cd695d15e664126470c401eed6 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sun, 27 Jan 2019 08:30:20 -0800 Subject: Refs #23919 -- Replaced codecs.open() with open(). On Python 3, open() handles encodings. --- tests/admin_scripts/tests.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/admin_scripts') diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py index 15a18eefee..31e88c959c 100644 --- a/tests/admin_scripts/tests.py +++ b/tests/admin_scripts/tests.py @@ -3,7 +3,6 @@ A series of tests to establish that the command-line management tools work as advertised - especially with regards to the handling of the DJANGO_SETTINGS_MODULE and default settings.py files. """ -import codecs import os import re import shutil @@ -2178,7 +2177,7 @@ class StartProject(LiveServerTestCase, AdminScriptTestCase): self.assertNoOutput(err) self.assertTrue(os.path.isdir(testproject_dir)) path = os.path.join(testproject_dir, 'ticket-18091-non-ascii-template.txt') - with codecs.open(path, 'r', encoding='utf-8') as f: + with open(path, encoding='utf-8') as f: self.assertEqual(f.read().splitlines(False), [ 'Some non-ASCII text for testing ticket #18091:', 'üäö €']) -- cgit v1.3