]> git.phdru.name Git - m_librarian.git/blobdiff - tests/test_config.py
Add option -C|--config file
[m_librarian.git] / tests / test_config.py
diff --git a/tests/test_config.py b/tests/test_config.py
new file mode 100755 (executable)
index 0000000..6e0c6a3
--- /dev/null
@@ -0,0 +1,19 @@
+#! /usr/bin/env python
+
+import os
+import unittest
+from tests import main
+from m_librarian.config import get_config
+
+
+class TestFormat(unittest.TestCase):
+    def test_config(self):
+        config_path = os.path.join(
+            os.path.dirname(__file__), 'test_config.conf')
+        get_config(config_path)
+        ml_conf = get_config()
+        self.assertEqual(ml_conf.get('library', 'path'), '/home/test-config')
+
+
+if __name__ == "__main__":
+    main()