diff options
author | Tim Graham <timograham@gmail.com> | 2017-02-07 12:05:47 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2017-02-09 09:03:47 -0500 |
commit | 500532c95db40b0b24654be7bb0d76b66b022bd5 (patch) | |
tree | 761766d7138652703e566ac9c96960a265f036ff /tests/files | |
parent | 21f13ff5b3d5a42d62f38398c010efcdce30dad7 (diff) | |
download | django-500532c95db40b0b24654be7bb0d76b66b022bd5.tar.gz |
Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().
Diffstat (limited to 'tests/files')
-rw-r--r-- | tests/files/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/files/tests.py b/tests/files/tests.py index 4036fc5e79..9b3e019f8d 100644 --- a/tests/files/tests.py +++ b/tests/files/tests.py @@ -135,7 +135,7 @@ class FileTests(unittest.TestCase): def test_io_wrapper(self): content = "vive l'été\n" with tempfile.TemporaryFile() as temp, File(temp, name='something.txt') as test_file: - test_file.write(content.encode('utf-8')) + test_file.write(content.encode()) test_file.seek(0) wrapper = TextIOWrapper(test_file, 'utf-8', newline='\n') self.assertEqual(wrapper.read(), content) @@ -144,7 +144,7 @@ class FileTests(unittest.TestCase): self.assertEqual(wrapper.read(), content * 2) test_file = wrapper.detach() test_file.seek(0) - self.assertEqual(test_file.read(), (content * 2).encode('utf-8')) + self.assertEqual(test_file.read(), (content * 2).encode()) class NoNameFileTestCase(unittest.TestCase): |