Skip to content

Commit

Permalink
Add additional unit test to check that it uses default timeout if env…
Browse files Browse the repository at this point in the history
… var has negative number
  • Loading branch information
volodymyrZotov committed Apr 3, 2024
1 parent 3236661 commit 4bcf4d7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tests/test_client_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,3 +493,9 @@ def test_env_client_request_timeout_env_var_is_zero():
with mock.patch.dict(os.environ, {ENV_CLIENT_REQUEST_TIMEOUT: '0'}):
client_instance = client.new_client(HOST, TOKEN)
assert client_instance.session.timeout.read == DEFAULT_TIMEOUT_CONFIG.read


def test_env_client_request_timeout_env_var_is_negative_number():
with mock.patch.dict(os.environ, {ENV_CLIENT_REQUEST_TIMEOUT: '-10'}):
client_instance = client.new_client(HOST, TOKEN)
assert client_instance.session.timeout.read == DEFAULT_TIMEOUT_CONFIG.read

0 comments on commit 4bcf4d7

Please sign in to comment.