diff options
author | Emmanuel Raviart <eraviart@entrouvert.com> | 2004-08-30 19:51:51 +0000 |
---|---|---|
committer | Emmanuel Raviart <eraviart@entrouvert.com> | 2004-08-30 19:51:51 +0000 |
commit | 6710fec968ed73bc88c4c8ab67121be37b1fa785 (patch) | |
tree | cfc067f848f3ae7c53ef95baee13e1266a63b81e /python | |
parent | e5c29d9105924a773ad2e7980fde14328f71c8e6 (diff) | |
download | lasso-6710fec968ed73bc88c4c8ab67121be37b1fa785.tar.gz lasso-6710fec968ed73bc88c4c8ab67121be37b1fa785.tar.xz lasso-6710fec968ed73bc88c4c8ab67121be37b1fa785.zip |
New logout test => Red alert!
Diffstat (limited to 'python')
-rwxr-xr-x | python/tests/profiles_tests.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/python/tests/profiles_tests.py b/python/tests/profiles_tests.py index 2939ac4d..e49085bb 100755 --- a/python/tests/profiles_tests.py +++ b/python/tests/profiles_tests.py @@ -132,6 +132,28 @@ class LogoutTestCase(unittest.TestCase): logout = lasso.Logout(lassoServer, lasso.providerTypeIdp) self.failIf(logout.getNextProviderId()) + def test01(self): + """IDP logout; testing processRequestMsg with non Liberty query.""" + + lassoServer = lasso.Server( + os.path.join(dataDir, 'idp1-la/metadata.xml'), + None, # os.path.join(dataDir, 'idp1-la/public-key.pem') is no more used + os.path.join(dataDir, 'idp1-la/private-key-raw.pem'), + os.path.join(dataDir, 'idp1-la/certificate.pem'), + lasso.signatureMethodRsaSha1) + lassoServer.addProvider( + os.path.join(dataDir, 'sp1-la/metadata.xml'), + os.path.join(dataDir, 'sp1-la/public-key.pem'), + os.path.join(dataDir, 'sp1-la/certificate.pem')) + logout = lasso.Logout(lassoServer, lasso.providerTypeIdp) + # The processRequestMsg should failt but not abort. + try: + logout.processRequestMsg('passport=0&lasso=1', lasso.httpMethodRedirect) + except SyntaxError: + pass + else: + self.fail('Logout processRequestMsg should have failed.') + class DefederationTestCase(unittest.TestCase): def test01(self): |