Skip to content
Browse files

Fixed #21505 -- Added unit test for django.utils.text.get_valid_filen…

…ame.
  • Loading branch information...
1 parent 101da92 commit 7169722d5c4c9f9829e353fbeda08b7550bf8991 @vajrasky vajrasky committed with bmispelon
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/utils_tests/test_text.py
View
4 tests/utils_tests/test_text.py
@@ -127,3 +127,7 @@ def test_unescape_entities(self):
]
for value, output in items:
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")

0 comments on commit 7169722

Please sign in to comment.
Something went wrong with that request. Please try again.