Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().

This commit is contained in:
Tim Graham 2017-02-07 12:05:47 -05:00
parent 21f13ff5b3
commit 500532c95d
32 changed files with 61 additions and 65 deletions

View file

@ -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):