@@ -37,7 +37,7 @@ def test_add_person(self):
37
37
self .population .add_information_about_person (session_info )
38
38
39
39
issuers = self .population .issuers_of_info (nid )
40
- assert issuers == [IDP_ONE ]
40
+ assert list ( issuers ) == [IDP_ONE ]
41
41
subjects = [code (c ) for c in self .population .subjects ()]
42
42
assert subjects == [cnid ]
43
43
# Are any of the sources gone stale
@@ -55,7 +55,8 @@ def test_add_person(self):
55
55
'surName' : 'Andersson' }
56
56
57
57
info = self .population .get_info_from (nid , IDP_ONE )
58
- assert info .keys () == ["not_on_or_after" , "name_id" , "ava" ]
58
+ assert sorted (list (info .keys ())) == sorted (["not_on_or_after" ,
59
+ "name_id" , "ava" ])
59
60
assert info ["name_id" ] == nid
60
61
assert info [
"ava" ]
== {
'mail' :
'[email protected] ' ,
61
62
'givenName' : 'Anders' ,
@@ -93,7 +94,8 @@ def test_extend_person(self):
93
94
"eduPersonEntitlement" : "Anka" }
94
95
95
96
info = self .population .get_info_from (nid , IDP_OTHER )
96
- assert info .keys () == ["not_on_or_after" , "name_id" , "ava" ]
97
+ assert sorted (list (info .keys ())) == sorted (["not_on_or_after" ,
98
+ "name_id" , "ava" ])
97
99
assert info ["name_id" ] == nid
98
100
assert info ["ava" ] == {"eduPersonEntitlement" : "Anka" }
99
101
@@ -111,7 +113,7 @@ def test_add_another_person(self):
111
113
self .population .add_information_about_person (session_info )
112
114
113
115
issuers = self .population .issuers_of_info (nida )
114
- assert issuers == [IDP_ONE ]
116
+ assert list ( issuers ) == [IDP_ONE ]
115
117
subjects = [code (c ) for c in self .population .subjects ()]
116
118
assert _eq (subjects , [cnid , cnida ])
117
119
@@ -130,7 +132,8 @@ def test_add_another_person(self):
130
132
}
131
133
132
134
info = self .population .get_info_from (nida , IDP_ONE )
133
- assert info .keys () == ["not_on_or_after" , "name_id" , "ava" ]
135
+ assert sorted (list (info .keys ())) == sorted (["not_on_or_after" ,
136
+ "name_id" , "ava" ])
134
137
assert info ["name_id" ] == nida
135
138
assert info ["ava" ] == {"givenName" : "Bertil" ,
136
139
"surName" : "Bertilsson" ,
@@ -170,6 +173,7 @@ def test_modify_person(self):
170
173
"eduPersonEntitlement" : "Anka" }
171
174
172
175
info = self .population .get_info_from (nid , IDP_OTHER )
173
- assert list (info .keys ()) == ["not_on_or_after" , "name_id" , "ava" ]
176
+ assert sorted (list (info .keys ())) == sorted (["not_on_or_after" ,
177
+ "name_id" , "ava" ])
174
178
assert info ["name_id" ] == nid
175
179
assert info ["ava" ] == {"eduPersonEntitlement" : "Anka" }
0 commit comments