@@ -242,7 +242,7 @@ def test_create_attribute_query_3(self):
242242 req_id , req = self .client .create_attribute_query (
243243 "https://aai-demo-idp.switch.ch/idp/shibboleth" ,
244244 "_e7b68a04488f715cda642fbdd90099f5" ,
245- format = saml . NAMEID_FORMAT_TRANSIENT ,
245+ format = NAMEID_FORMAT_TRANSIENT ,
246246 message_id = "id1" )
247247
248248 assert isinstance (req , samlp .AttributeQuery )
@@ -253,12 +253,15 @@ def test_create_attribute_query_3(self):
253253 assert req .issue_instant
254254 assert req .issuer .text == "urn:mace:example.com:saml:roland:sp"
255255 nameid = req .subject .name_id
256- assert nameid .format == saml . NAMEID_FORMAT_TRANSIENT
256+ assert nameid .format == NAMEID_FORMAT_TRANSIENT
257257 assert nameid .text == "_e7b68a04488f715cda642fbdd90099f5"
258258
259259 def test_create_auth_request_0 (self ):
260260 ar_str = "%s" % self .client .create_authn_request (
261- "http://www.example.com/sso" , message_id = "id1" )[1 ]
261+ "http://www.example.com/sso" ,
262+ message_id = "id1" ,
263+ nameid_format = NAMEID_FORMAT_TRANSIENT ,
264+ )[1 ]
262265
263266 ar = samlp .authn_request_from_string (ar_str )
264267 assert ar .assertion_consumer_service_url == ("http://lingon.catalogix"
@@ -270,7 +273,7 @@ def test_create_auth_request_0(self):
270273 assert ar .issuer .text == "urn:mace:example.com:saml:roland:sp"
271274 nid_policy = ar .name_id_policy
272275 assert nid_policy .allow_create is None
273- assert nid_policy .format == saml . NAMEID_FORMAT_TRANSIENT
276+ assert nid_policy .format == NAMEID_FORMAT_TRANSIENT
274277
275278 node_requested_attributes = None
276279 for e in ar .extensions .extension_elements :
@@ -892,7 +895,7 @@ def test_sign_then_encrypt_assertion(self):
892895 subject = factory (saml .Subject , text = "_aaa" ,
893896 name_id = factory (
894897 saml .NameID ,
895- format = saml . NAMEID_FORMAT_TRANSIENT )),
898+ format = NAMEID_FORMAT_TRANSIENT )),
896899 attribute_statement = do_attribute_statement (
897900 {
898901 ("" , "" , "sn" ): ("Jeter" , "" ),
@@ -976,7 +979,7 @@ def test_sign_then_encrypt_assertion2(self):
976979 self .client .config .entityid ,
977980 self .server .config .attribute_converters ,
978981 self .server .config .getattr ("policy" , "idp" ),
979- name_id = factory (saml .NameID , format = saml . NAMEID_FORMAT_TRANSIENT ),
982+ name_id = factory (saml .NameID , format = NAMEID_FORMAT_TRANSIENT ),
980983 issuer = self .server ._issuer (),
981984 authn_class = INTERNETPROTOCOLPASSWORD ,
982985 authn_auth = "http://www.example.com/login" ,
@@ -1037,7 +1040,7 @@ def test_sign_then_encrypt_assertion_advice_1(self):
10371040 'in_response_to' : "_012345" ,
10381041 'subject_confirmation_method' : saml .SCM_BEARER
10391042 }
1040- name_id = factory (saml .NameID , format = saml . NAMEID_FORMAT_TRANSIENT )
1043+ name_id = factory (saml .NameID , format = NAMEID_FORMAT_TRANSIENT )
10411044
10421045 farg = add_path (
10431046 {},
@@ -1149,7 +1152,7 @@ def test_sign_then_encrypt_assertion_advice_2(self):
11491152 farg ['assertion' ]['subject' ]['subject_confirmation' ],
11501153 ['subject_confirmation_data' , 'recipient' ,
11511154 "http://lingon.catalogix.se:8087/" ])
1152- name_id = factory (saml .NameID , format = saml . NAMEID_FORMAT_TRANSIENT )
1155+ name_id = factory (saml .NameID , format = NAMEID_FORMAT_TRANSIENT )
11531156
11541157 assertion_1 = asser_1 .construct (
11551158 self .client .config .entityid ,
@@ -1796,7 +1799,7 @@ def test_create_attribute_query_3(self):
17961799 req_id , req = self .client .create_attribute_query (
17971800 "https://aai-demo-idp.switch.ch/idp/shibboleth" ,
17981801 "_e7b68a04488f715cda642fbdd90099f5" ,
1799- format = saml . NAMEID_FORMAT_TRANSIENT ,
1802+ format = NAMEID_FORMAT_TRANSIENT ,
18001803 message_id = "id1" )
18011804
18021805 assert isinstance (req , samlp .AttributeQuery )
@@ -1807,12 +1810,15 @@ def test_create_attribute_query_3(self):
18071810 assert req .issue_instant
18081811 assert req .issuer .text == "urn:mace:example.com:saml:roland:sp"
18091812 nameid = req .subject .name_id
1810- assert nameid .format == saml . NAMEID_FORMAT_TRANSIENT
1813+ assert nameid .format == NAMEID_FORMAT_TRANSIENT
18111814 assert nameid .text == "_e7b68a04488f715cda642fbdd90099f5"
18121815
18131816 def test_create_auth_request_0 (self ):
18141817 ar_str = "%s" % self .client .create_authn_request (
1815- "http://www.example.com/sso" , message_id = "id1" )[1 ]
1818+ "http://www.example.com/sso" ,
1819+ message_id = "id1" ,
1820+ nameid_format = NAMEID_FORMAT_TRANSIENT ,
1821+ )[1 ]
18161822
18171823 ar = samlp .authn_request_from_string (ar_str )
18181824 assert ar .assertion_consumer_service_url == ("http://lingon.catalogix"
@@ -1824,7 +1830,7 @@ def test_create_auth_request_0(self):
18241830 assert ar .issuer .text == "urn:mace:example.com:saml:roland:sp"
18251831 nid_policy = ar .name_id_policy
18261832 assert nid_policy .allow_create is None
1827- assert nid_policy .format == saml . NAMEID_FORMAT_TRANSIENT
1833+ assert nid_policy .format == NAMEID_FORMAT_TRANSIENT
18281834
18291835 node_requested_attributes = None
18301836 for e in ar .extensions .extension_elements :
@@ -2464,7 +2470,7 @@ def test_sign_then_encrypt_assertion(self):
24642470 subject = factory (saml .Subject , text = "_aaa" ,
24652471 name_id = factory (
24662472 saml .NameID ,
2467- format = saml . NAMEID_FORMAT_TRANSIENT )),
2473+ format = NAMEID_FORMAT_TRANSIENT )),
24682474 attribute_statement = do_attribute_statement (
24692475 {
24702476 ("" , "" , "sn" ): ("Jeter" , "" ),
@@ -2548,7 +2554,7 @@ def test_sign_then_encrypt_assertion2(self):
25482554 self .client .config .entityid ,
25492555 self .server .config .attribute_converters ,
25502556 self .server .config .getattr ("policy" , "idp" ),
2551- name_id = factory (saml .NameID , format = saml . NAMEID_FORMAT_TRANSIENT ),
2557+ name_id = factory (saml .NameID , format = NAMEID_FORMAT_TRANSIENT ),
25522558 issuer = self .server ._issuer (),
25532559 authn_class = INTERNETPROTOCOLPASSWORD ,
25542560 authn_auth = "http://www.example.com/login" ,
@@ -2609,7 +2615,7 @@ def test_sign_then_encrypt_assertion_advice_1(self):
26092615 'in_response_to' : "_012345" ,
26102616 'subject_confirmation_method' : saml .SCM_BEARER
26112617 }
2612- name_id = factory (saml .NameID , format = saml . NAMEID_FORMAT_TRANSIENT )
2618+ name_id = factory (saml .NameID , format = NAMEID_FORMAT_TRANSIENT )
26132619
26142620 farg = add_path (
26152621 {},
@@ -2722,7 +2728,7 @@ def test_sign_then_encrypt_assertion_advice_2(self):
27222728 farg ['assertion' ]['subject' ]['subject_confirmation' ],
27232729 ['subject_confirmation_data' , 'recipient' ,
27242730 "http://lingon.catalogix.se:8087/" ])
2725- name_id = factory (saml .NameID , format = saml . NAMEID_FORMAT_TRANSIENT )
2731+ name_id = factory (saml .NameID , format = NAMEID_FORMAT_TRANSIENT )
27262732
27272733 assertion_1 = asser_1 .construct (
27282734 self .client .config .entityid ,
0 commit comments