diff options
| author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-06-29 09:15:00 +0000 |
|---|---|---|
| committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-06-29 09:15:00 +0000 |
| commit | 6f617027e9c46f3cb907e8bdbe1d3ef265d2b4d0 (patch) | |
| tree | bc5da40467a2f6400ab1d6b5a4fe974f5dc65107 /bindings/python | |
| parent | d9d4e6ae384ec48dfb533771fc05192c60f55102 (diff) | |
| download | lasso-6f617027e9c46f3cb907e8bdbe1d3ef265d2b4d0.tar.gz lasso-6f617027e9c46f3cb907e8bdbe1d3ef265d2b4d0.tar.xz lasso-6f617027e9c46f3cb907e8bdbe1d3ef265d2b4d0.zip | |
Merge branch 'issue-86'
Diffstat (limited to 'bindings/python')
| -rwxr-xr-x | bindings/python/tests/profiles_tests.py | 19 |
1 files changed, 18 insertions, 1 deletions
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 = '''<samlp:LogoutRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" ID="xxxx" Version="2.0" IssueInstant="2010-06-14T22:00:00"> + <samlp:Issuer>me</samlp:Issuer> + <samlp:SessionIndex>id1</samlp:SessionIndex> + <samlp:SessionIndex>id2</samlp:SessionIndex> + <samlp:SessionIndex>id3</samlp:SessionIndex> + </samlp:LogoutRequest>''' + + 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()) |
