Show More
@@ -27,14 +27,15 b' from rhodecode.config.middleware import ' | |||||
27 |
|
27 | |||
28 | class TestHelperFunctions(object): |
|
28 | class TestHelperFunctions(object): | |
29 | @pytest.mark.parametrize('raw, expected', [ |
|
29 | @pytest.mark.parametrize('raw, expected', [ | |
30 | ('true', True), |
|
30 | ('true', True), (u'true', True), | |
31 | ('yes', True), |
|
31 | ('yes', True), (u'yes', True), | |
32 | ('on', True), |
|
32 | ('on', True), (u'on', True), | |
33 | ('false', False), |
|
33 | ('false', False), (u'false', False), | |
34 | ('no', False), |
|
34 | ('no', False), (u'no', False), | |
35 | ('off', False), |
|
35 | ('off', False), (u'off', False), | |
36 | ('invalid-bool-value', False), |
|
36 | ('invalid-bool-value', False), | |
37 | ('invalid-∫øø@-√å@¨€', False), |
|
37 | ('invalid-∫øø@-√å@¨€', False), | |
|
38 | (u'invalid-∫øø@-√å@¨€', False), | |||
38 | ]) |
|
39 | ]) | |
39 | def test_bool_setting_helper(self, raw, expected): |
|
40 | def test_bool_setting_helper(self, raw, expected): | |
40 | key = 'dummy-key' |
|
41 | key = 'dummy-key' | |
@@ -47,6 +48,7 b' class TestHelperFunctions(object):' | |||||
47 | ('test-string', 'test-string'), |
|
48 | ('test-string', 'test-string'), | |
48 | ('CaSe-TeSt', 'case-test'), |
|
49 | ('CaSe-TeSt', 'case-test'), | |
49 | ('test-string-烩€', 'test-string-烩€'), |
|
50 | ('test-string-烩€', 'test-string-烩€'), | |
|
51 | (u'test-string-烩€', u'test-string-烩€'), | |||
50 | ]) |
|
52 | ]) | |
51 | def test_string_setting_helper(self, raw, expected): |
|
53 | def test_string_setting_helper(self, raw, expected): | |
52 | key = 'dummy-key' |
|
54 | key = 'dummy-key' | |
@@ -58,12 +60,15 b' class TestHelperFunctions(object):' | |||||
58 | ('', []), |
|
60 | ('', []), | |
59 | ('test', ['test']), |
|
61 | ('test', ['test']), | |
60 | ('CaSe-TeSt', ['CaSe-TeSt']), |
|
62 | ('CaSe-TeSt', ['CaSe-TeSt']), | |
|
63 | ('test-string-烩€', ['test-string-烩€']), | |||
|
64 | (u'test-string-烩€', [u'test-string-烩€']), | |||
61 | ('hg git svn', ['hg', 'git', 'svn']), |
|
65 | ('hg git svn', ['hg', 'git', 'svn']), | |
62 | ('hg,git,svn', ['hg', 'git', 'svn']), |
|
66 | ('hg,git,svn', ['hg', 'git', 'svn']), | |
63 | ('hg, git, svn', ['hg', 'git', 'svn']), |
|
67 | ('hg, git, svn', ['hg', 'git', 'svn']), | |
64 | ('hg\ngit\nsvn', ['hg', 'git', 'svn']), |
|
68 | ('hg\ngit\nsvn', ['hg', 'git', 'svn']), | |
65 | ('hg\n git\n svn', ['hg', 'git', 'svn']), |
|
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 | def test_list_setting_helper(self, raw, expected): |
|
73 | def test_list_setting_helper(self, raw, expected): | |
69 | key = 'dummy-key' |
|
74 | key = 'dummy-key' |
General Comments 0
You need to be logged in to leave comments.
Login now