summaryrefslogtreecommitdiff
path: root/tests/test_51_client.py
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2019-07-08 21:14:54 +0300
committerIvan Kanakarakis <ivan.kanak@gmail.com>2019-07-08 21:14:54 +0300
commit124376b3a707edf354fcc2e7311a86af864cf647 (patch)
treec95dce6d8ad14ff995f18b7a06e8006d29a677c7 /tests/test_51_client.py
parent5a435953afbc71405c777ab658d9fc1394931277 (diff)
downloadpysaml2-124376b3a707edf354fcc2e7311a86af864cf647.tar.gz
Fix tests to be compatible with latest pytest
Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
Diffstat (limited to 'tests/test_51_client.py')
-rw-r--r--tests/test_51_client.py45
1 files changed, 30 insertions, 15 deletions
diff --git a/tests/test_51_client.py b/tests/test_51_client.py
index f24fb709..a063dcb4 100644
--- a/tests/test_51_client.py
+++ b/tests/test_51_client.py
@@ -1552,10 +1552,12 @@ class TestClient:
response = create_authn_response(**kwargs)
set_client_want(True, True, True)
- raises(SignatureError, parse_authn_response, response)
+ with raises(SignatureError):
+ parse_authn_response(response)
set_client_want(True, True, False)
- raises(SignatureError, parse_authn_response, response)
+ with raises(SignatureError):
+ parse_authn_response(response)
set_client_want(True, False, True)
parse_authn_response(response)
@@ -1564,10 +1566,12 @@ class TestClient:
parse_authn_response(response)
set_client_want(False, True, True)
- raises(SignatureError, parse_authn_response, response)
+ with raises(SignatureError):
+ parse_authn_response(response)
set_client_want(False, True, False)
- raises(SignatureError, parse_authn_response, response)
+ with raises(SignatureError):
+ parse_authn_response(response)
set_client_want(False, False, True)
parse_authn_response(response)
@@ -1581,16 +1585,20 @@ class TestClient:
response = create_authn_response(**kwargs)
set_client_want(True, True, True)
- raises(SignatureError, parse_authn_response, response)
+ with raises(SignatureError):
+ parse_authn_response(response)
set_client_want(True, True, False)
- raises(SignatureError, parse_authn_response, response)
+ with raises(SignatureError):
+ parse_authn_response(response)
set_client_want(True, False, True)
- raises(SignatureError, parse_authn_response, response)
+ with raises(SignatureError):
+ parse_authn_response(response)
set_client_want(True, False, False)
- raises(SignatureError, parse_authn_response, response)
+ with raises(SignatureError):
+ parse_authn_response(response)
set_client_want(False, True, True)
parse_authn_response(response)
@@ -1639,25 +1647,32 @@ class TestClient:
response = create_authn_response(**kwargs)
set_client_want(True, True, True)
- raises(SignatureError, parse_authn_response, response)
+ with raises(SignatureError):
+ parse_authn_response(response)
set_client_want(True, True, False)
- raises(SignatureError, parse_authn_response, response)
+ with raises(SignatureError):
+ parse_authn_response(response)
set_client_want(True, False, True)
- raises(SignatureError, parse_authn_response, response)
+ with raises(SignatureError):
+ parse_authn_response(response)
set_client_want(True, False, False)
- raises(SignatureError, parse_authn_response, response)
+ with raises(SignatureError):
+ parse_authn_response(response)
set_client_want(False, True, True)
- raises(SignatureError, parse_authn_response, response)
+ with raises(SignatureError):
+ parse_authn_response(response)
set_client_want(False, True, False)
- raises(SignatureError, parse_authn_response, response)
+ with raises(SignatureError):
+ parse_authn_response(response)
set_client_want(False, False, True)
- raises(SigverError, parse_authn_response, response)
+ with raises(SigverError):
+ parse_authn_response(response)
set_client_want(False, False, False)
parse_authn_response(response)