summaryrefslogtreecommitdiffstats
path: root/bindings
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-06-29 14:15:01 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-06-29 14:15:01 +0000
commitf27fa8171ae37df159abdcd3b1ec18a25e03f84a (patch)
tree558412070d4d5acb4d4fed9bbf14db8341073160 /bindings
parent4a36e6d065919691354965cabad7d2dea91e82a0 (diff)
downloadlasso-f27fa8171ae37df159abdcd3b1ec18a25e03f84a.tar.gz
lasso-f27fa8171ae37df159abdcd3b1ec18a25e03f84a.tar.xz
lasso-f27fa8171ae37df159abdcd3b1ec18a25e03f84a.zip
[ID-WSF2] add idwsf2 test script to test suite
Re-activate ID-WSF 2.0 test script. Fix problem with provider issuing assertion role. Need to be fixed more generally in the future.
Diffstat (limited to 'bindings')
-rw-r--r--bindings/python/tests/Makefile.am2
-rwxr-xr-xbindings/python/tests/idwsf2_tests.py8
2 files changed, 7 insertions, 3 deletions
diff --git a/bindings/python/tests/Makefile.am b/bindings/python/tests/Makefile.am
index fcf3647a..c2130fb3 100644
--- a/bindings/python/tests/Makefile.am
+++ b/bindings/python/tests/Makefile.am
@@ -8,7 +8,7 @@ TESTS += profiles_tests.py binding_tests.py
endif
if WSF_ENABLED
-TESTS += idwsf1_tests.py # idwsf2_tests.py
+TESTS += idwsf1_tests.py idwsf2_tests.py
endif
EXTRA_DIST = profiles_tests.py binding_tests.py idwsf1_tests.py idwsf2_tests.py
diff --git a/bindings/python/tests/idwsf2_tests.py b/bindings/python/tests/idwsf2_tests.py
index 063f2eaf..cadb605f 100755
--- a/bindings/python/tests/idwsf2_tests.py
+++ b/bindings/python/tests/idwsf2_tests.py
@@ -61,6 +61,7 @@ class IdWsf2TestCase(unittest.TestCase):
idp_metadata = os.path.join(dataDir, 'idp5-saml2/metadata.xml')
server = lasso.Server(wsp_metadata, wsp_private_key, None, None)
+ server.role = lasso.PROVIDER_ROLE_SP
server.addProvider(lasso.PROVIDER_ROLE_IDP, idp_metadata, None, None)
server.setEncryptionPrivateKey(wsp_private_key);
@@ -72,6 +73,7 @@ class IdWsf2TestCase(unittest.TestCase):
idp_metadata = os.path.join(dataDir, 'idp5-saml2/metadata.xml')
server = lasso.Server(wsc_metadata, wsc_private_key, None, None)
+ server.role = lasso.PROVIDER_ROLE_SP
server.addProvider(lasso.PROVIDER_ROLE_IDP, idp_metadata, None, None)
return server;
@@ -79,6 +81,7 @@ class IdWsf2TestCase(unittest.TestCase):
def getIdpServer(self):
if hasattr(self, 'idp_server_dump') and self.idp_server_dump is not None:
server = lasso.Server.newFromDump(self.idp_server_dump)
+ server.role = lasso.PROVIDER_ROLE_IDP
else:
idp_metadata = os.path.join(dataDir, 'idp5-saml2/metadata.xml')
idp_private_key = os.path.join(dataDir, 'idp5-saml2/private-key.pem')
@@ -86,6 +89,7 @@ class IdWsf2TestCase(unittest.TestCase):
wsc_metadata = os.path.join(dataDir, 'sp6-saml2/metadata.xml')
server = lasso.Server(idp_metadata, idp_private_key, None, None)
+ server.role = lasso.PROVIDER_ROLE_IDP
server.addProvider(lasso.PROVIDER_ROLE_SP, wsp_metadata, None, None)
server.getProvider(server.providerIds[0]).setEncryptionMode(lasso.ENCRYPTION_MODE_NAMEID);
server.addProvider(lasso.PROVIDER_ROLE_SP, wsc_metadata, None, None)
@@ -580,7 +584,7 @@ class MetadataTestCase(IdWsf2TestCase):
idp_disco = lasso.IdWsf2Discovery(idp)
idp_disco.processRequestMsg(wsp_disco.msgBody)
idp_disco.checkSecurityMechanism()
- self.failUnlessEqual(idp_disco.svcmdids, None)
+ self.failUnlessEqual(idp_disco.svcmdids, ())
sender = idp_disco.getSoapEnvelopeRequest().sb2GetProviderId()
for svcMDID in service_map.get(sender, []):
idp_disco.addServiceMetadata(service_map.get(svcMDID))
@@ -676,7 +680,7 @@ class MetadataAssociationTestCase(IdWsf2TestCase):
idp_disco = lasso.IdWsf2Discovery(idp)
idp_disco.processRequestMsg(wsp_disco.msgBody)
idp_disco.checkSecurityMechanism()
- self.failUnlessEqual(idp_disco.svcmdids, None)
+ self.failUnlessEqual(idp_disco.svcmdids, ())
f = self.nid2tuple(idp_disco.getNameIdentifier())
uid = federations[f]
result = []