Skip to content

Commit

Permalink
removed env var check from create_logger_dicts
Browse files Browse the repository at this point in the history
  • Loading branch information
charlottekostelic committed Oct 30, 2024
1 parent 7973819 commit 32e20b9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
10 changes: 0 additions & 10 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions vendor_file_cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 32e20b9

Please sign in to comment.