Skip to content

Commit

Permalink
test: make the SSLError check stricter
Browse files Browse the repository at this point in the history
Signed-off-by: Norbert Biczo <[email protected]>
  • Loading branch information
pyrooka committed Jul 2, 2024
1 parent 6a110fe commit d772f78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_http_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ def test_ssl_verification():
service = BaseService(service_url='https://localhost:3333', authenticator=NoAuthAuthenticator())
#
# First call the server with the default configuration.
# It should fail due to the invalid SSL cert.
# It should fail due to the self-signed SSL cert.
assert service.disable_ssl_verification is False
prepped = service.prepare_request('GET', url='/')
with pytest.raises(SSLError):
with pytest.raises(SSLError, match="certificate verify failed: self-signed certificate"):
res = service.send(prepped)

# Next configure it to validate by using our local certificate. Should raise no exception.
Expand Down

0 comments on commit d772f78

Please sign in to comment.