diff options
Diffstat (limited to 'tests/utils/configobj_test.py')
-rw-r--r-- | tests/utils/configobj_test.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/utils/configobj_test.py b/tests/utils/configobj_test.py new file mode 100644 index 00000000..9b212f29 --- /dev/null +++ b/tests/utils/configobj_test.py @@ -0,0 +1,17 @@ +# encoding=utf-8 +from __future__ import absolute_import + +import unittest + +from alot.utils import configobj as checks + + +class TestForceList(unittest.TestCase): + + def test_strings_are_converted_to_single_item_lists(self): + forced = checks.force_list('hello') + self.assertEqual(forced, ['hello']) + + def test_empty_strings_are_converted_to_empty_lists(self): + forced = checks.force_list('') + self.assertEqual(forced, []) |