@@ -183,7 +183,7 @@ def test_add_extension_attribute(self):
183
183
ec = saml2 .ExtensionContainer ()
184
184
ec .add_extension_attribute ("foo" , "bar" )
185
185
assert len (ec .extension_attributes ) == 1
186
- assert ec .extension_attributes .keys ()[0 ] == "foo"
186
+ assert list ( ec .extension_attributes .keys () )[0 ] == "foo"
187
187
188
188
189
189
class TestSAMLBase :
@@ -216,13 +216,14 @@ def test_make_vals_multi_dict(self):
216
216
217
217
attr = Attribute ()
218
218
saml2 .make_vals (ava , AttributeValue , attr , prop = "attribute_value" )
219
- assert attr .keyswv () == ["name_format" , "attribute_value" ]
219
+ assert sorted (attr .keyswv ()) == sorted (["name_format" ,
220
+ "attribute_value" ])
220
221
assert len (attr .attribute_value ) == 4
221
222
222
223
def test_to_string_nspair (self ):
223
224
foo = saml2 .make_vals ("lions" , AttributeValue , part = True )
224
- txt = foo .to_string ()
225
- nsstr = foo .to_string ({"saml" : saml .NAMESPACE })
225
+ txt = foo .to_string (). decode ( 'utf-8' )
226
+ nsstr = foo .to_string ({"saml" : saml .NAMESPACE }). decode ( 'utf-8' )
226
227
assert nsstr != txt
227
228
print (txt )
228
229
print (nsstr )
@@ -1215,4 +1216,4 @@ def testUsingTestData(self):
1215
1216
1216
1217
if __name__ == "__main__" :
1217
1218
t = TestSAMLBase ()
1218
- t .test_make_vals_multi_dict ()
1219
+ t .test_make_vals_multi_dict ()
0 commit comments