diff options
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): |
