Permalink
Browse files

Merge pull request #608 from lyndsysimon/secure_filename_tests

Expand test coverage for utils.secure_filename
  • Loading branch information...
2 parents 3d9fbb7 + 9a93ce3 commit d76c0d7f841c9ef34f69b3e46af6fbe4fd842fd9 @davidism davidism committed on GitHub Jun 10, 2017
Showing with 2 additions and 0 deletions.
  1. +2 −0 tests/test_utils.py
View
@@ -295,3 +295,5 @@ def test_secure_filename():
assert utils.secure_filename('../../../etc/passwd') == 'etc_passwd'
assert utils.secure_filename(u'i contain cool \xfcml\xe4uts.txt') == \
'i_contain_cool_umlauts.txt'
+ assert utils.secure_filename('__filename__') == 'filename'
+ assert utils.secure_filename('foo$&^*)bar') == 'foobar'

0 comments on commit d76c0d7

Please sign in to comment.