From 6710fec968ed73bc88c4c8ab67121be37b1fa785 Mon Sep 17 00:00:00 2001 From: Emmanuel Raviart Date: Mon, 30 Aug 2004 19:51:51 +0000 Subject: New logout test => Red alert! --- python/tests/profiles_tests.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'python') 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): -- cgit