aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_trapd_get_cbs_config.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_trapd_get_cbs_config.py')
-rw-r--r--tests/test_trapd_get_cbs_config.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_trapd_get_cbs_config.py b/tests/test_trapd_get_cbs_config.py
index accb986..44bf021 100644
--- a/tests/test_trapd_get_cbs_config.py
+++ b/tests/test_trapd_get_cbs_config.py
@@ -54,6 +54,21 @@ class test_get_cbs_config(unittest.TestCase):
assert pytest_wrapped_sys_exit.value.code == 1
+ def test_cbs_override_env_unset(self):
+ """
+ """
+ os.environ.update(CBS_SIM_JSON='')
+ #result = trapd_get_cbs_config.get_cbs_config()
+ #print("result: %s" % result)
+ # compare = str(result).startswith("{'snmptrap': ")
+ # self.assertEqual(compare, False)
+
+ with pytest.raises(SystemExit) as pytest_wrapped_sys_exit:
+ result = trapd_get_cbs_config.get_cbs_config()
+ assert pytest_wrapped_sys_exit.type == SystemExit
+ assert pytest_wrapped_sys_exit.value.code == 1
+
+
def test_cbs_fallback_env_present(self):
"""
Test that CBS fallback env variable exists and we can get config