mirror of
https://github.com/django/django.git
synced 2025-12-15 21:45:20 +00:00
Fixed unescape_string_literal() crash on empty strings.
This commit is contained in:
parent
5d9c512e5b
commit
e1d673c373
2 changed files with 2 additions and 2 deletions
|
|
@ -226,7 +226,7 @@ class TestUtilsText(SimpleTestCase):
|
|||
self.assertEqual(text.unescape_string_literal(lazystr(value)), output)
|
||||
|
||||
def test_unescape_string_literal_invalid_value(self):
|
||||
items = ['abc', "'abc\""]
|
||||
items = ['', 'abc', "'abc\""]
|
||||
for item in items:
|
||||
msg = f'Not a string literal: {item!r}'
|
||||
with self.assertRaisesMessage(ValueError, msg):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue