Skip to content

Commit

Permalink
Test password value correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamondJoseph committed Sep 17, 2024
1 parent 24219a7 commit 36e3a59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit_tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ def test_auth_from_env():
def test_auth_from_env_repeated_key():
auth = BasicAuthentication(username="${FOO}", password="${FOO}")
assert auth.username == "bar"
assert auth.password == "bar"
assert auth.password.get_secret_value() == "bar"


@mock.patch.dict(os.environ, {"FOO": "bar"}, clear=True)
def test_auth_from_env_ignore_case():
auth = BasicAuthentication(username="${FOO}", password="${foo}")
assert auth.username == "bar"
assert auth.password == "bar"
assert auth.password.get_secret_value() == "bar"


@mock.patch.dict(os.environ, {"FOO": "bar"}, clear=True)
Expand Down

0 comments on commit 36e3a59

Please sign in to comment.