summaryrefslogtreecommitdiffstats
path: root/tests/unit/test-022-utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/test-022-utils.py')
-rw-r--r--tests/unit/test-022-utils.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/unit/test-022-utils.py b/tests/unit/test-022-utils.py
new file mode 100644
index 0000000..ad65aea
--- /dev/null
+++ b/tests/unit/test-022-utils.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+
+import unittest
+
+from pykolab import utils
+
+
+class TestTranslate(unittest.TestCase):
+
+ def test_001_normalize(self):
+ attr = {"test1": " trim ", "test2": [" trim1 ", " trim2 "]}
+ result = utils.normalize(attr)
+
+ self.assertEqual(result['test1'], "trim")
+ self.assertEqual(result['test2'][0], "trim1")
+ self.assertEqual(result['test2'][1], "trim2")
+
+
+if __name__ == '__main__':
+ unittest.main()