Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion test/test_prase_it.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"xml"
]

test_files_location = os.getenv("TEST_FILES_LOCATION", "test_files")
test_files_location = os.getenv("TEST_FILES_LOCATION", "test/test_files")


class BaseTests(TestCase):
Expand Down Expand Up @@ -120,6 +120,7 @@ def test_read_envvar_single_file_config(self):
parser = ParseIt(config_location=test_files_location + "/test.hcl")
reply = parser.read_configuration_variable("file_type")
self.assertEqual(reply, "envvar")
del os.environ["FILE_TYPE"]

def test_read_cli_args_folder_does_not_exist_raise_warn(self):
with self.assertWarns(Warning):
Expand Down Expand Up @@ -781,6 +782,7 @@ def test_envvar_defined_true(self):
os.environ["TEST_ENV"] = "123"
reply = envvar_defined("TEST_ENV")
self.assertTrue(reply)
del os.environ["TEST_ENV"]

def test_envvar_defined_false(self):
reply = envvar_defined("TEST_ENV")
Expand All @@ -790,11 +792,13 @@ def test_envvar_defined_true_upper_case(self):
os.environ["TEST_ENV"] = "123"
reply = envvar_defined("test_env", force_uppercase=True)
self.assertTrue(reply)
del os.environ["TEST_ENV"]

def test_envvar_defined_false_upper_case(self):
os.environ["TEST_ENV"] = "123"
reply = envvar_defined("test_env", force_uppercase=False)
self.assertFalse(reply)
del os.environ["TEST_ENV"]

def test_read_all_envvars_to_dict_force_uppercase_true(self):
test_envvars = {"TEST_ENV": "123", "test_env_lowercase": "456"}
Expand Down