summaryrefslogtreecommitdiff
path: root/tests/utils
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-01-25 09:36:23 -0800
committerDylan Baker <dylan@pnwbakers.com>2017-01-25 10:37:20 -0800
commitde85d34545fc8f67b80697a73a2d676b740e9ddd (patch)
tree368c4bf753d9549c0182a8a66035a0429f823530 /tests/utils
parent0ec97d98e82d10024419199b93c1d13a1cedc5eb (diff)
move alot/settings/checks to alot/utils/configobj
This is just more reorganization.
Diffstat (limited to 'tests/utils')
-rw-r--r--tests/utils/__init__.py0
-rw-r--r--tests/utils/configobj_test.py17
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/utils/__init__.py b/tests/utils/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/utils/__init__.py
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, [])