summaryrefslogtreecommitdiff
path: root/tests/test_30_mdstore.py
diff options
context:
space:
mode:
authorClint Byrum <clint@fewbar.com>2015-05-15 10:52:33 -0700
committerClint Byrum <clint@fewbar.com>2015-05-15 11:52:15 -0700
commit99911f6c4c7d51071f70709e55fabcd2e6853284 (patch)
tree9ae82d0d6c11e05bd9bd152c94993d21f744b252 /tests/test_30_mdstore.py
parent4ef44631df5426e0b4808b1c79b51a37eb026a76 (diff)
downloadpysaml2-99911f6c4c7d51071f70709e55fabcd2e6853284.tar.gz
Fix python3 syntax errors
Retains python2.7 compatibility for all files. Fixes only syntax errors, tests still fail on python3 for various reasons.
Diffstat (limited to 'tests/test_30_mdstore.py')
-rw-r--r--tests/test_30_mdstore.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/test_30_mdstore.py b/tests/test_30_mdstore.py
index 9d62092d..14a2c091 100644
--- a/tests/test_30_mdstore.py
+++ b/tests/test_30_mdstore.py
@@ -148,10 +148,10 @@ def test_incommon_1():
mds.imp(METADATACONF["2"])
- print mds.entities()
+ print(mds.entities())
assert mds.entities() > 1700
idps = mds.with_descriptor("idpsso")
- print idps.keys()
+ print(idps.keys())
assert len(idps) > 300 # ~ 18%
try:
_ = mds.single_sign_on_service('urn:mace:incommon:uiuc.edu')
@@ -160,7 +160,7 @@ def test_incommon_1():
idpsso = mds.single_sign_on_service('urn:mace:incommon:alaska.edu')
assert len(idpsso) == 1
- print idpsso
+ print(idpsso)
assert destinations(idpsso) == [
'https://idp.alaska.edu/idp/profile/SAML2/Redirect/SSO']
@@ -176,7 +176,7 @@ def test_incommon_1():
# Look for attribute authorities
aas = mds.with_descriptor("attribute_authority")
- print aas.keys()
+ print(aas.keys())
assert len(aas) == 180
@@ -216,24 +216,24 @@ def test_switch_1():
mds.imp(METADATACONF["5"])
assert len(mds.keys()) > 160
idps = mds.with_descriptor("idpsso")
- print idps.keys()
+ print(idps.keys())
idpsso = mds.single_sign_on_service(
'https://aai-demo-idp.switch.ch/idp/shibboleth')
assert len(idpsso) == 1
- print idpsso
+ print(idpsso)
assert destinations(idpsso) == [
'https://aai-demo-idp.switch.ch/idp/profile/SAML2/Redirect/SSO']
assert len(idps) > 30
aas = mds.with_descriptor("attribute_authority")
- print aas.keys()
+ print(aas.keys())
aad = aas['https://aai-demo-idp.switch.ch/idp/shibboleth']
- print aad.keys()
+ print(aad.keys())
assert len(aad["attribute_authority_descriptor"]) == 1
assert len(aad["idpsso_descriptor"]) == 1
sps = mds.with_descriptor("spsso")
dual = [eid for eid, ent in idps.items() if eid in sps]
- print len(dual)
+ print(len(dual))
assert len(dual) == 0
@@ -243,7 +243,7 @@ def test_metadata_file():
disable_ssl_certificate_validation=True)
mds.imp(METADATACONF["8"])
- print len(mds.keys())
+ print(len(mds.keys()))
assert len(mds.keys()) == 560
@@ -280,7 +280,7 @@ def test_load_local_dir():
disable_ssl_certificate_validation=True)
mds.imp(METADATACONF["9"])
- print mds
+ print(mds)
assert len(mds) == 3 # Three sources
assert len(mds.keys()) == 4 # number of idps
@@ -291,7 +291,7 @@ def test_load_extern_incommon():
disable_ssl_certificate_validation=True)
mds.imp(METADATACONF["10"])
- print mds
+ print(mds)
assert mds
assert len(mds.keys())