commit 87504281b16a58f89b061298dde1c4abd4d59f8e
parent a4a27351ec18de7af2ef8a140068f612da2fb467
Author: lash <dev@holbrook.no>
Date: Wed, 11 May 2022 17:52:51 +0000
Add multischema test
Diffstat:
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/tests/test_multi.py b/tests/test_multi.py
@@ -1,5 +1,4 @@
-#!/usr/bin/python
-
+# standard imports
import os
import unittest
import logging
@@ -54,8 +53,20 @@ class TestBasic(unittest.TestCase):
c = Config(inidir_one, override_dirs=[inidir_two])
with self.assertRaises(KeyError):
c.process()
-
-
+
+
+ def test_multi_schema(self):
+ inidir_one = os.path.join(self.wd, 'files', 'multi_schema', 'foo')
+ inidir_two = os.path.join(self.wd, 'files', 'multi_schema', 'bar')
+ c = Config(inidir_one)
+ c.add_schema_dir(inidir_two)
+ c.process()
+ r = c.get('FOO_BAZ')
+ self.assertEqual(r, '42')
+ r = c.get('XYZZY_SNUH')
+ self.assertEqual(r, '13')
+
+
if __name__ == '__main__':
unittest.main()