mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().
This commit is contained in:
parent
21f13ff5b3
commit
500532c95d
32 changed files with 61 additions and 65 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue