diff options
author | Florian Apolloner <florian@apolloner.eu> | 2021-12-14 12:38:28 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-12-14 20:19:44 +0100 |
commit | e1d673c373a7d032060872b690a92fc95496612e (patch) | |
tree | 2bebd60e8cc58029761fd1b55cfc8f3598be6676 /tests/utils_tests | |
parent | 5d9c512e5b42e1c686300c214453bf0b820d7326 (diff) | |
download | django-e1d673c373a7d032060872b690a92fc95496612e.tar.gz |
Fixed unescape_string_literal() crash on empty strings.
Diffstat (limited to 'tests/utils_tests')
-rw-r--r-- | tests/utils_tests/test_text.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/utils_tests/test_text.py b/tests/utils_tests/test_text.py index 5d6c53afdd..820a890bc5 100644 --- a/tests/utils_tests/test_text.py +++ b/tests/utils_tests/test_text.py @@ -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): |