summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rwxr-xr-xpython/tests/profiles_tests.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/python/tests/profiles_tests.py b/python/tests/profiles_tests.py
index 9607a7e1..060e94cb 100755
--- a/python/tests/profiles_tests.py
+++ b/python/tests/profiles_tests.py
@@ -143,8 +143,9 @@ class LogoutTestCase(unittest.TestCase):
# The processRequestMsg should fail but not abort.
try:
logout.processRequestMsg('passport=0&lasso=1', lasso.httpMethodRedirect)
- except lasso.SyntaxError:
- pass
+ except lasso.Error, error:
+ if error[0] != lasso.PROFILE_ERROR_INVALID_QUERY:
+ raise
else:
self.fail('Logout processRequestMsg should have failed.')
@@ -164,8 +165,9 @@ class LogoutTestCase(unittest.TestCase):
# The processResponseMsg should fail but not abort.
try:
logout.processResponseMsg('liberty=&alliance', lasso.httpMethodRedirect)
- except lasso.SyntaxError:
- pass
+ except lasso.Error, error:
+ if error[0] != lasso.PROFILE_ERROR_INVALID_QUERY:
+ raise
else:
self.fail('Logout processResponseMsg should have failed.')
@@ -200,8 +202,9 @@ class DefederationTestCase(unittest.TestCase):
# The processNotificationMsg should fail but not abort.
try:
defederation.processNotificationMsg('nonLibertyQuery=1', lasso.httpMethodRedirect)
- except lasso.SyntaxError:
- pass
+ except lasso.Error, error:
+ if error[0] != lasso.PROFILE_ERROR_INVALID_QUERY:
+ raise
else:
self.fail('Defederation processNotificationMsg should have failed.')