##// END OF EJS Templates
Added a test for clean_filename.
David Warde-Farley -
Show More
@@ -0,0 +1,20 b''
1 import re
2 import nose.tools as nt
3 from converters.base import clean_filename
4
5
6 def test_clean_filename():
7 good_chars = re.compile('^[a-zA-Z0-9_]+$')
8
9 def check_str(s):
10 nt.assert_true(good_chars.match(clean_filename(s)) is not None)
11
12 strings = [
13 'abCaBdX0753--$++()',
14 '()$(@dasdk_%^^&&($#*@',
15 '%(#)@#@%^(^#DKDOPSfks0943k',
16 '439DDxsx___dsaigfj6&^',
17 '\'sdf594,,<<.>>/"""\'\'{}||]]'
18 ]
19 for s in strings:
20 yield check_str, s
General Comments 0
You need to be logged in to leave comments. Login now