diff options
Diffstat (limited to 'tests/test_something.py')
-rw-r--r-- | tests/test_something.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_something.py b/tests/test_something.py index 8091f46..7bb979a 100644 --- a/tests/test_something.py +++ b/tests/test_something.py @@ -1,4 +1,5 @@ import json +import os from unittest import TestCase from configlib.model_impl import BaseConfig @@ -19,6 +20,12 @@ test_dict = { 'a': 1 } } +env_dict = { + 'something': '$env:ENVVAR', + 'ye': { + 'a': 1 + } +} def verify_test_dict(conf): @@ -37,3 +44,8 @@ class TestSomething(TestCase): def test_text(self): conf: SomeConfig = SomeConfig.loads(json.dumps(test_dict)) verify_test_dict(conf) + + def test_environ(self): + os.environ['ENVVAR'] = 'hmm' + conf: SomeConfig = SomeConfig.parse_dict(env_dict) + verify_test_dict(conf) |