Skip to content

Commit ca34400

Browse files
committed
Fix minor python3 failures in mdstore tests
Views need to be cast to list.
1 parent 1ddc080 commit ca34400

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/test_30_mdstore.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def test_ext_2():
190190
ents = mds.with_descriptor("spsso")
191191
for binding in [BINDING_SOAP, BINDING_HTTP_POST, BINDING_HTTP_ARTIFACT,
192192
BINDING_HTTP_REDIRECT]:
193-
assert mds.single_logout_service(ents.keys()[0], binding, "spsso")
193+
assert mds.single_logout_service(list(ents.keys())[0], binding, "spsso")
194194

195195

196196
def test_example():
@@ -201,7 +201,7 @@ def test_example():
201201
assert len(mds.keys()) == 1
202202
idps = mds.with_descriptor("idpsso")
203203

204-
assert idps.keys() == [
204+
assert list(idps.keys()) == [
205205
'http://xenosmilus.umdc.umu.se/simplesaml/saml2/idp/metadata.php']
206206
certs = mds.certs(
207207
'http://xenosmilus.umdc.umu.se/simplesaml/saml2/idp/metadata.php',

tests/test_30_mdstore_old.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def test_ext_2():
176176
ents = mds.with_descriptor("spsso")
177177
for binding in [BINDING_SOAP, BINDING_HTTP_POST, BINDING_HTTP_ARTIFACT,
178178
BINDING_HTTP_REDIRECT]:
179-
assert mds.single_logout_service(ents.keys()[0], binding, "spsso")
179+
assert mds.single_logout_service(list(ents.keys())[0], binding, "spsso")
180180

181181

182182
def test_example():
@@ -187,7 +187,7 @@ def test_example():
187187
assert len(mds.keys()) == 1
188188
idps = mds.with_descriptor("idpsso")
189189

190-
assert idps.keys() == [
190+
assert list(idps.keys()) == [
191191
'http://xenosmilus.umdc.umu.se/simplesaml/saml2/idp/metadata.php']
192192
certs = mds.certs(
193193
'http://xenosmilus.umdc.umu.se/simplesaml/saml2/idp/metadata.php',

0 commit comments

Comments
 (0)