From 18358d49c39995dd6d8cff8feac3e556bf08b1e0 Mon Sep 17 00:00:00 2001 From: Frederic Peters Date: Wed, 8 Mar 2006 11:02:42 +0000 Subject: fixing python test. --- python/tests/errorchecking_tests.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'python') diff --git a/python/tests/errorchecking_tests.py b/python/tests/errorchecking_tests.py index 3b744e84..859965d7 100644 --- a/python/tests/errorchecking_tests.py +++ b/python/tests/errorchecking_tests.py @@ -71,8 +71,9 @@ class ErrorCheckingTestCase(unittest.TestCase): login = lasso.Login(server) try: login.processAuthnRequestMsg("") - except lasso.Error: - pass + except lasso.Error, error: + if error[0] != -407: + raise def test04(self): server = lasso.Server( @@ -81,8 +82,11 @@ class ErrorCheckingTestCase(unittest.TestCase): None, os.path.join(dataDir, 'sp1-la/certificate.pem')) logout = lasso.Logout(server) - logout.initRequest(None, lasso.HTTP_METHOD_REDIRECT) - logout.buildRequestMsg() + try: + logout.initRequest(None, lasso.HTTP_METHOD_REDIRECT) + except lasso.Error, error: + if error[0] != -418: + raise -- cgit