mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Removed an untested and broken branch in force_bytes() (refs #6353).
The new test crashed in the removed branch. It's unclear if the branch has
value since c6a2bd9b96 didn't include tests.
This commit is contained in:
parent
4ee877a7b0
commit
26619ad7b0
2 changed files with 3 additions and 14 deletions
|
|
@ -42,8 +42,8 @@ class TestEncodingUtils(SimpleTestCase):
|
|||
"""
|
||||
error_msg = "This is an exception, voilà"
|
||||
exc = ValueError(error_msg)
|
||||
result = force_bytes(exc)
|
||||
self.assertEqual(result, error_msg.encode('utf-8'))
|
||||
self.assertEqual(force_bytes(exc), error_msg.encode('utf-8'))
|
||||
self.assertEqual(force_bytes(exc, encoding='ascii', errors='ignore'), b'This is an exception, voil')
|
||||
|
||||
def test_force_bytes_strings_only(self):
|
||||
today = datetime.date.today()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue