mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-21 10:22:18 +00:00
auth: coerce tls insecure flag safely instead of using Python truthiness
This commit is contained in:
parent
2bf73fbe2c
commit
79cffa9232
1 changed files with 3 additions and 1 deletions
|
|
@ -77,10 +77,12 @@ class TestResolveVerifyFallback:
|
|||
assert result is False
|
||||
|
||||
def test_string_false_in_auth_state_does_not_disable_tls_verify(self):
|
||||
import ssl
|
||||
from hermes_cli.auth import _resolve_verify
|
||||
|
||||
result = _resolve_verify(auth_state={"tls": {"insecure": "false"}})
|
||||
assert result is True
|
||||
assert result is not False
|
||||
assert result is True or isinstance(result, ssl.SSLContext)
|
||||
|
||||
def test_string_true_in_auth_state_disables_tls_verify(self):
|
||||
from hermes_cli.auth import _resolve_verify
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue