Fixed #21505 -- Added unit test for django.utils.text.get_valid_filename.
This commit is contained in:
parent
101da92ebd
commit
7169722d5c
|
@ -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…
Reference in New Issue