def test_none_os_env_load(self): """Try to get a non-existant env from os""" self.assertEqual(ENV.load_env('doesntexist'), None)
def test_bad_json_os_env_load(self): """Try to get bad json env from os""" os.environ['testbadjson'] = '{"label": "whoop' self.assertEqual(ENV.load_env('testbadjson'), None)
def test_os_env_load(self): """Try to get an env from os""" os.environ['oktestenv'] = 'test' self.assertEqual(ENV.load_env('oktestenv', get_json=False), 'test')