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/utils_tests | |
| parent | 21f13ff5b3d5a42d62f38398c010efcdce30dad7 (diff) | |
Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().
Diffstat (limited to 'tests/utils_tests')
| -rw-r--r-- | tests/utils_tests/test_encoding.py | 2 | ||||
| -rw-r--r-- | tests/utils_tests/test_text.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/utils_tests/test_encoding.py b/tests/utils_tests/test_encoding.py index c1e3323f15..e3da394e77 100644 --- a/tests/utils_tests/test_encoding.py +++ b/tests/utils_tests/test_encoding.py @@ -42,7 +42,7 @@ class TestEncodingUtils(SimpleTestCase): """ error_msg = "This is an exception, voilĂ " exc = ValueError(error_msg) - self.assertEqual(force_bytes(exc), error_msg.encode('utf-8')) + self.assertEqual(force_bytes(exc), error_msg.encode()) self.assertEqual(force_bytes(exc, encoding='ascii', errors='ignore'), b'This is an exception, voil') def test_force_bytes_strings_only(self): diff --git a/tests/utils_tests/test_text.py b/tests/utils_tests/test_text.py index a869ced774..465db554da 100644 --- a/tests/utils_tests/test_text.py +++ b/tests/utils_tests/test_text.py @@ -214,7 +214,7 @@ class TestUtilsText(SimpleTestCase): def test_compress_sequence(self): data = [{'key': i} for i in range(10)] seq = list(json.JSONEncoder().iterencode(data)) - seq = [s.encode('utf-8') for s in seq] + seq = [s.encode() for s in seq] actual_length = len(b''.join(seq)) out = text.compress_sequence(seq) compressed_length = len(b''.join(out)) |
