mirror of
https://github.com/django/django.git
synced 2025-11-15 17:49:27 +00:00
Fixed #21505 -- Added unit test for django.utils.text.get_valid_filename.
This commit is contained in:
parent
101da92ebd
commit
7169722d5c
1 changed files with 4 additions and 0 deletions
|
|
@ -127,3 +127,7 @@ class TestUtilsText(SimpleTestCase):
|
||||||
]
|
]
|
||||||
for value, output in items:
|
for value, output in items:
|
||||||
self.assertEqual(text.unescape_entities(value), output)
|
self.assertEqual(text.unescape_entities(value), output)
|
||||||
|
|
||||||
|
def test_get_valid_filename(self):
|
||||||
|
filename = "^&'@{}[],$=!-#()%+~_123.txt"
|
||||||
|
self.assertEqual(text.get_valid_filename(filename), "-_123.txt")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue