commit | author | age | ||
eb1fc1 | 1 | import unittest |
CM | 2 | |
0c29cf | 3 | |
49fb77 | 4 | class TestParseVars(unittest.TestCase): |
JA | 5 | def test_parse_vars_good(self): |
6 | from pyramid.scripts.common import parse_vars | |
0c29cf | 7 | |
49fb77 | 8 | vars = ['a=1', 'b=2'] |
JA | 9 | result = parse_vars(vars) |
10 | self.assertEqual(result, {'a': '1', 'b': '2'}) | |
11 | ||
12 | def test_parse_vars_bad(self): | |
13 | from pyramid.scripts.common import parse_vars | |
0c29cf | 14 | |
49fb77 | 15 | vars = ['a'] |
JA | 16 | self.assertRaises(ValueError, parse_vars, vars) |