From 6f617027e9c46f3cb907e8bdbe1d3ef265d2b4d0 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 29 Jun 2010 09:15:00 +0000 Subject: Merge branch 'issue-86' --- bindings/python/tests/profiles_tests.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'bindings/python') diff --git a/bindings/python/tests/profiles_tests.py b/bindings/python/tests/profiles_tests.py index 9e71e82d..42cac2f9 100755 --- a/bindings/python/tests/profiles_tests.py +++ b/bindings/python/tests/profiles_tests.py @@ -401,15 +401,32 @@ class AttributeAuthorityTestCase(unittest.TestCase): assert aq.response.assertion[0].attributeStatement[0].attribute[0] assert aq.response.assertion[0].attributeStatement[0].attribute[0].attributeValue[0] +class LogoutTestCase(unittest.TestCase): + def test01(self): + '''Test parsing of a logout request with more than one session index''' + content = ''' + me + id1 + id2 + id3 + ''' + + node = lasso.Samlp2LogoutRequest.newFromXmlNode(content) + assert isinstance(node, lasso.Samlp2LogoutRequest) + print node.sessionIndex + assert node.sessionIndex == 'id3' + assert node.sessionIndexes == ('id1', 'id2', 'id3') + serverSuite = unittest.makeSuite(ServerTestCase, 'test') loginSuite = unittest.makeSuite(LoginTestCase, 'test') logoutSuite = unittest.makeSuite(LogoutTestCase, 'test') defederationSuite = unittest.makeSuite(DefederationTestCase, 'test') identitySuite = unittest.makeSuite(IdentityTestCase, 'test') attributeSuite = unittest.makeSuite(AttributeAuthorityTestCase, 'test') +logoutSuite = unittest.makeSuite(LogoutTestCase, 'test') allTests = unittest.TestSuite((serverSuite, loginSuite, logoutSuite, defederationSuite, - identitySuite, attributeSuite)) + identitySuite, attributeSuite, logoutSuite)) if __name__ == '__main__': sys.exit(not unittest.TextTestRunner(verbosity = 2).run(allTests).wasSuccessful()) -- cgit