Skip to content

Commit

Permalink
"matches" is not a valid kwarg
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Lutro committed Nov 20, 2018
1 parent f2eb7d3 commit 06a0aab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ def test_set_auth_ssl(httpsserver):
missing_key_password = dict(auth_params, key_password=None)
client.set_auth(**missing_key_password)
error_msg = "Key file is encrypted but key password was not provided"
with pytest.raises(ValueError, matches=error_msg):
with pytest.raises(ValueError, match=error_msg):
client.discover_services()

# Test that server certificate authentication can fail:
invalid_server_ca_cert = dict(auth_params, ca_cert=None)
client.set_auth(**invalid_server_ca_cert)
error_msg = "certificate verify failed"
with pytest.raises(urllib.error.URLError, matches=error_msg):
with pytest.raises(urllib.error.URLError, match=error_msg):
client.discover_services()

# Test that verify_ssl=False ignores the invalid certificate:
Expand Down

0 comments on commit 06a0aab

Please sign in to comment.