From 32e20b91320f07e6c6d68280eec74b43684aeaa6 Mon Sep 17 00:00:00 2001 From: Charlotte Kostelic Date: Wed, 30 Oct 2024 12:15:35 -0400 Subject: [PATCH] removed env var check from create_logger_dicts --- tests/test_utils.py | 10 ---------- vendor_file_cli/utils.py | 2 -- 2 files changed, 12 deletions(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index 5180ac3..549a024 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -58,16 +58,6 @@ def test_create_logger_dict(cli_runner): ) -def test_create_logger_dict_no_env_vars(unset_env_var, mocker, mock_vendor_creds): - env_vars = os.environ.keys() - assert "NSDROP_HOST" not in env_vars - assert any("NSDROP" in i for i in os.environ.keys()) is False - m = mocker.mock_open(read_data=mock_vendor_creds) - mocker.patch("vendor_file_cli.utils.open", m) - create_logger_dict() - assert os.environ["NSDROP_HOST"] == "ftp.nsdrop.com" - - def test_get_control_number(stub_record): control_no = get_control_number(stub_record) assert control_no == "on1381158740" diff --git a/vendor_file_cli/utils.py b/vendor_file_cli/utils.py index da9c3c2..eb8f70e 100644 --- a/vendor_file_cli/utils.py +++ b/vendor_file_cli/utils.py @@ -66,8 +66,6 @@ def connect(name: str) -> Client: def create_logger_dict() -> dict: """Create a dictionary to configure logger.""" - if any("NSDROP" in i for i in os.environ.keys()) is False: - load_creds() loggly_token = os.environ["LOGGLY_TOKEN"] return { "version": 1,