Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…ame.
  • Loading branch information...
commit 7169722d5c4c9f9829e353fbeda08b7550bf8991 1 parent 101da92
Vajrasky Kok vajrasky authored bmispelon committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/utils_tests/test_text.py
4 tests/utils_tests/test_text.py
View
@@ -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")
Please sign in to comment.
Something went wrong with that request. Please try again.