##// END OF EJS Templates
tests: Add some test cases for unicode and list separation.
Martin Bornhold -
r606:277d7136 default
parent child Browse files
Show More
@@ -27,14 +27,15 b' from rhodecode.config.middleware import '
27 27
28 28 class TestHelperFunctions(object):
29 29 @pytest.mark.parametrize('raw, expected', [
30 ('true', True),
31 ('yes', True),
32 ('on', True),
33 ('false', False),
34 ('no', False),
35 ('off', False),
30 ('true', True), (u'true', True),
31 ('yes', True), (u'yes', True),
32 ('on', True), (u'on', True),
33 ('false', False), (u'false', False),
34 ('no', False), (u'no', False),
35 ('off', False), (u'off', False),
36 36 ('invalid-bool-value', False),
37 37 ('invalid-∫øø@-√å@¨€', False),
38 (u'invalid-∫øø@-√å@¨€', False),
38 39 ])
39 40 def test_bool_setting_helper(self, raw, expected):
40 41 key = 'dummy-key'
@@ -47,6 +48,7 b' class TestHelperFunctions(object):'
47 48 ('test-string', 'test-string'),
48 49 ('CaSe-TeSt', 'case-test'),
49 50 ('test-string-烩€', 'test-string-烩€'),
51 (u'test-string-烩€', u'test-string-烩€'),
50 52 ])
51 53 def test_string_setting_helper(self, raw, expected):
52 54 key = 'dummy-key'
@@ -58,12 +60,15 b' class TestHelperFunctions(object):'
58 60 ('', []),
59 61 ('test', ['test']),
60 62 ('CaSe-TeSt', ['CaSe-TeSt']),
63 ('test-string-烩€', ['test-string-烩€']),
64 (u'test-string-烩€', [u'test-string-烩€']),
61 65 ('hg git svn', ['hg', 'git', 'svn']),
62 66 ('hg,git,svn', ['hg', 'git', 'svn']),
63 67 ('hg, git, svn', ['hg', 'git', 'svn']),
64 68 ('hg\ngit\nsvn', ['hg', 'git', 'svn']),
65 69 ('hg\n git\n svn', ['hg', 'git', 'svn']),
66 ('test-string-烩€', ['test-string-烩€']),
70 (', hg , git , svn , ', ['', 'hg', 'git', 'svn', '']),
71 ('cheese,free node,other', ['cheese', 'free node', 'other']),
67 72 ])
68 73 def test_list_setting_helper(self, raw, expected):
69 74 key = 'dummy-key'
General Comments 0
You need to be logged in to leave comments. Login now