@@ -493,7 +493,7 @@ def testValidateVersion(self):
493493 xml = self .file_contents (join (self .data_path , 'responses' , 'invalids' , 'no_saml2.xml.base64' ))
494494 response = OneLogin_Saml2_Response (settings , xml )
495495 with self .assertRaisesRegexp (Exception , 'Unsupported SAML version' ):
496- response .is_valid (self .get_request_data (), raises = True )
496+ response .is_valid (self .get_request_data (), raise_exceptions = True )
497497
498498 def testValidateID (self ):
499499 """
@@ -504,7 +504,7 @@ def testValidateID(self):
504504 xml = self .file_contents (join (self .data_path , 'responses' , 'invalids' , 'no_id.xml.base64' ))
505505 response = OneLogin_Saml2_Response (settings , xml )
506506 with self .assertRaisesRegexp (Exception , 'Missing ID attribute on SAML Response' ):
507- response .is_valid (self .get_request_data (), raises = True )
507+ response .is_valid (self .get_request_data (), raise_exceptions = True )
508508
509509 def testIsInValidReference (self ):
510510 """
@@ -534,7 +534,7 @@ def testIsInValidExpired(self):
534534 settings .set_strict (True )
535535 response_2 = OneLogin_Saml2_Response (settings , xml )
536536 with self .assertRaisesRegexp (Exception , 'Timing issues \(please check your clock settings\)' ):
537- response_2 .is_valid (self .get_request_data (), raises = True )
537+ response_2 .is_valid (self .get_request_data (), raise_exceptions = True )
538538
539539 def testIsInValidNoStatement (self ):
540540 """
@@ -592,7 +592,7 @@ def testIsInValidNoKey(self):
592592 xml = self .file_contents (join (self .data_path , 'responses' , 'invalids' , 'no_key.xml.base64' ))
593593 response = OneLogin_Saml2_Response (settings , xml )
594594 with self .assertRaisesRegexp (Exception , 'Signature validation failed. SAML Response rejected' ):
595- response .is_valid (self .get_request_data (), raises = True )
595+ response .is_valid (self .get_request_data (), raise_exceptions = True )
596596
597597 def testIsInValidMultipleAssertions (self ):
598598 """
@@ -604,7 +604,7 @@ def testIsInValidMultipleAssertions(self):
604604 xml = self .file_contents (join (self .data_path , 'responses' , 'invalids' , 'multiple_assertions.xml.base64' ))
605605 response = OneLogin_Saml2_Response (settings , xml )
606606 with self .assertRaisesRegexp (Exception , 'SAML Response must contain 1 assertion' ):
607- response .is_valid (self .get_request_data (), raises = True )
607+ response .is_valid (self .get_request_data (), raise_exceptions = True )
608608
609609 def testIsInValidEncAttrs (self ):
610610 """
@@ -620,7 +620,7 @@ def testIsInValidEncAttrs(self):
620620 settings .set_strict (True )
621621 response_2 = OneLogin_Saml2_Response (settings , xml )
622622 with self .assertRaisesRegexp (Exception , 'There is an EncryptedAttribute in the Response and this SP not support them' ):
623- response_2 .is_valid (self .get_request_data (), raises = True )
623+ response_2 .is_valid (self .get_request_data (), raise_exceptions = True )
624624
625625 def testIsInValidDuplicatedAttrs (self ):
626626 """
@@ -723,11 +723,11 @@ def testIsInValidIssuer(self):
723723 settings .set_strict (True )
724724 response_3 = OneLogin_Saml2_Response (settings , message )
725725 with self .assertRaisesRegexp (Exception , 'Invalid issuer in the Assertion/Response' ):
726- response_3 .is_valid (request_data , raises = True )
726+ response_3 .is_valid (request_data , raise_exceptions = True )
727727
728728 response_4 = OneLogin_Saml2_Response (settings , message_2 )
729729 with self .assertRaisesRegexp (Exception , 'Invalid issuer in the Assertion/Response' ):
730- response_4 .is_valid (request_data , raises = True )
730+ response_4 .is_valid (request_data , raise_exceptions = True )
731731
732732 def testIsInValidSessionIndex (self ):
733733 """
@@ -752,7 +752,7 @@ def testIsInValidSessionIndex(self):
752752 settings .set_strict (True )
753753 response_2 = OneLogin_Saml2_Response (settings , message )
754754 with self .assertRaisesRegexp (Exception , 'The attributes have expired, based on the SessionNotOnOrAfter of the AttributeStatement of this Response' ):
755- response_2 .is_valid (request_data , raises = True )
755+ response_2 .is_valid (request_data , raise_exceptions = True )
756756
757757 def testDatetimeWithMiliseconds (self ):
758758 """
@@ -843,27 +843,27 @@ def testIsInValidSubjectConfirmation(self):
843843 settings .set_strict (True )
844844 response = OneLogin_Saml2_Response (settings , message )
845845 with self .assertRaisesRegexp (Exception , 'A valid SubjectConfirmation was not found on this Response' ):
846- response .is_valid (request_data , raises = True )
846+ response .is_valid (request_data , raise_exceptions = True )
847847
848848 response_2 = OneLogin_Saml2_Response (settings , message_2 )
849849 with self .assertRaisesRegexp (Exception , 'A valid SubjectConfirmation was not found on this Response' ):
850- response_2 .is_valid (request_data , raises = True )
850+ response_2 .is_valid (request_data , raise_exceptions = True )
851851
852852 response_3 = OneLogin_Saml2_Response (settings , message_3 )
853853 with self .assertRaisesRegexp (Exception , 'A valid SubjectConfirmation was not found on this Response' ):
854- response_3 .is_valid (request_data , raises = True )
854+ response_3 .is_valid (request_data , raise_exceptions = True )
855855
856856 response_4 = OneLogin_Saml2_Response (settings , message_4 )
857857 with self .assertRaisesRegexp (Exception , 'A valid SubjectConfirmation was not found on this Response' ):
858- response_4 .is_valid (request_data , raises = True )
858+ response_4 .is_valid (request_data , raise_exceptions = True )
859859
860860 response_5 = OneLogin_Saml2_Response (settings , message_5 )
861861 with self .assertRaisesRegexp (Exception , 'A valid SubjectConfirmation was not found on this Response' ):
862- response_5 .is_valid (request_data , raises = True )
862+ response_5 .is_valid (request_data , raise_exceptions = True )
863863
864864 response_6 = OneLogin_Saml2_Response (settings , message_6 )
865865 with self .assertRaisesRegexp (Exception , 'A valid SubjectConfirmation was not found on this Response' ):
866- response_6 .is_valid (request_data , raises = True )
866+ response_6 .is_valid (request_data , raise_exceptions = True )
867867
868868 def testIsInValidRequestId (self ):
869869 """
@@ -889,7 +889,7 @@ def testIsInValidRequestId(self):
889889 settings .set_strict (True )
890890 response = OneLogin_Saml2_Response (settings , message )
891891 with self .assertRaisesRegexp (Exception , 'The InResponseTo of the Response' ):
892- response .is_valid (request_data , request_id , raises = True )
892+ response .is_valid (request_data , request_id , raise_exceptions = True )
893893
894894 valid_request_id = '_57bcbf70-7b1f-012e-c821-782bcb13bb38'
895895 response .is_valid (request_data , valid_request_id )
@@ -934,7 +934,7 @@ def testIsInValidSignIssues(self):
934934 settings_4 = OneLogin_Saml2_Settings (settings_info )
935935 response_4 = OneLogin_Saml2_Response (settings_4 , message )
936936 with self .assertRaisesRegexp (Exception , 'The Assertion of the Response is not signed and the SP require it' ):
937- response_4 .is_valid (request_data , raises = True )
937+ response_4 .is_valid (request_data , raise_exceptions = True )
938938
939939 settings_info ['security' ]['wantAssertionsSigned' ] = False
940940 settings_info ['strict' ] = False
@@ -962,7 +962,7 @@ def testIsInValidSignIssues(self):
962962 settings_8 = OneLogin_Saml2_Settings (settings_info )
963963 response_8 = OneLogin_Saml2_Response (settings_8 , message )
964964 with self .assertRaisesRegexp (Exception , 'The Message of the Response is not signed and the SP require it' ):
965- response_8 .is_valid (request_data , raises = True )
965+ response_8 .is_valid (request_data , raise_exceptions = True )
966966
967967 def testIsInValidEncIssues (self ):
968968 """
@@ -1044,7 +1044,7 @@ def testIsInValidCert(self):
10441044 response = OneLogin_Saml2_Response (settings , xml )
10451045
10461046 with self .assertRaisesRegexp (Exception , 'failed to load key' ):
1047- response .is_valid (self .get_request_data (), raises = True )
1047+ response .is_valid (self .get_request_data (), raise_exceptions = True )
10481048
10491049 def testIsInValidCert2 (self ):
10501050 """
@@ -1270,4 +1270,4 @@ def testIsValidRaisesExceptionWhenRaisesArgumentIsTrue(self):
12701270 self .assertFalse (response .is_valid (self .get_request_data ()))
12711271
12721272 with self .assertRaises (Exception ):
1273- response .is_valid (self .get_request_data (), raises = True )
1273+ response .is_valid (self .get_request_data (), raise_exceptions = True )
0 commit comments