summaryrefslogtreecommitdiff
path: root/tests/staticfiles_tests/test_management.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2019-01-27 08:30:20 -0800
committerTim Graham <timograham@gmail.com>2019-01-27 17:39:57 -0500
commitce7293bc91e993cd695d15e664126470c401eed6 (patch)
tree4329dcd087d5f04a1ebec42510bcea8c064db873 /tests/staticfiles_tests/test_management.py
parent20ea68c4fea2beca258634ef026146d1555cc5b7 (diff)
downloaddjango-ce7293bc91e993cd695d15e664126470c401eed6.tar.gz
Refs #23919 -- Replaced codecs.open() with open().
On Python 3, open() handles encodings.
Diffstat (limited to 'tests/staticfiles_tests/test_management.py')
-rw-r--r--tests/staticfiles_tests/test_management.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/staticfiles_tests/test_management.py b/tests/staticfiles_tests/test_management.py
index 1fdeaf78cc..c89240915b 100644
--- a/tests/staticfiles_tests/test_management.py
+++ b/tests/staticfiles_tests/test_management.py
@@ -1,4 +1,3 @@
-import codecs
import datetime
import os
import shutil
@@ -63,7 +62,7 @@ class TestFindStatic(TestDefaults, CollectionTestCase):
"""
def _get_file(self, filepath):
path = call_command('findstatic', filepath, all=False, verbosity=0, stdout=StringIO())
- with codecs.open(path, "r", "utf-8") as f:
+ with open(path, encoding='utf-8') as f:
return f.read()
def test_all_files(self):