From ca344002b100ef13c088e96f8dd94aa70d9f3404 Mon Sep 17 00:00:00 2001 From: Clint Byrum Date: Mon, 25 May 2015 16:32:07 -0700 Subject: [PATCH] Fix minor python3 failures in mdstore tests Views need to be cast to list. --- tests/test_30_mdstore.py | 4 ++-- tests/test_30_mdstore_old.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_30_mdstore.py b/tests/test_30_mdstore.py index 2017b3d..6f8b156 100644 --- a/tests/test_30_mdstore.py +++ b/tests/test_30_mdstore.py @@ -190,7 +190,7 @@ def test_ext_2(): ents = mds.with_descriptor("spsso") for binding in [BINDING_SOAP, BINDING_HTTP_POST, BINDING_HTTP_ARTIFACT, BINDING_HTTP_REDIRECT]: - assert mds.single_logout_service(ents.keys()[0], binding, "spsso") + assert mds.single_logout_service(list(ents.keys())[0], binding, "spsso") def test_example(): @@ -201,7 +201,7 @@ def test_example(): assert len(mds.keys()) == 1 idps = mds.with_descriptor("idpsso") - assert idps.keys() == [ + assert list(idps.keys()) == [ 'http://xenosmilus.umdc.umu.se/simplesaml/saml2/idp/metadata.php'] certs = mds.certs( 'http://xenosmilus.umdc.umu.se/simplesaml/saml2/idp/metadata.php', diff --git a/tests/test_30_mdstore_old.py b/tests/test_30_mdstore_old.py index 91d4504..408af1d 100644 --- a/tests/test_30_mdstore_old.py +++ b/tests/test_30_mdstore_old.py @@ -176,7 +176,7 @@ def test_ext_2(): ents = mds.with_descriptor("spsso") for binding in [BINDING_SOAP, BINDING_HTTP_POST, BINDING_HTTP_ARTIFACT, BINDING_HTTP_REDIRECT]: - assert mds.single_logout_service(ents.keys()[0], binding, "spsso") + assert mds.single_logout_service(list(ents.keys())[0], binding, "spsso") def test_example(): @@ -187,7 +187,7 @@ def test_example(): assert len(mds.keys()) == 1 idps = mds.with_descriptor("idpsso") - assert idps.keys() == [ + assert list(idps.keys()) == [ 'http://xenosmilus.umdc.umu.se/simplesaml/saml2/idp/metadata.php'] certs = mds.certs( 'http://xenosmilus.umdc.umu.se/simplesaml/saml2/idp/metadata.php',