mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user