summaryrefslogtreecommitdiffstats
path: root/python/tests/profiles_tests.py
diff options
context:
space:
mode:
authorEmmanuel Raviart <eraviart@entrouvert.com>2004-09-05 09:13:58 +0000
committerEmmanuel Raviart <eraviart@entrouvert.com>2004-09-05 09:13:58 +0000
commit34013a6092c2cd22138eb882355a69126b662096 (patch)
tree4af75382a6864eb3ad6f59b19e9841100f7a7291 /python/tests/profiles_tests.py
parenta208f6f6b02fdb553f6f5590cca25b9fd6bc244b (diff)
downloadlasso-34013a6092c2cd22138eb882355a69126b662096.tar.gz
lasso-34013a6092c2cd22138eb882355a69126b662096.tar.xz
lasso-34013a6092c2cd22138eb882355a69126b662096.zip
Changed Python exceptions generated by SWIG.
Diffstat (limited to 'python/tests/profiles_tests.py')
-rwxr-xr-xpython/tests/profiles_tests.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/python/tests/profiles_tests.py b/python/tests/profiles_tests.py
index 211920b0..bfbbd79e 100755
--- a/python/tests/profiles_tests.py
+++ b/python/tests/profiles_tests.py
@@ -109,9 +109,8 @@ class LogoutTestCase(unittest.TestCase):
logout = lasso.Logout(lassoServer, lasso.providerTypeSp)
try:
logout.initRequest()
- except RuntimeError, error:
- errorCode = int(error.args[0].split(' ', 1)[0])
- if errorCode != -1:
+ except lasso.Error, error:
+ if error[0] != -1:
raise
else:
self.fail('logout.initRequest without having set identity before should fail')
@@ -149,7 +148,7 @@ class LogoutTestCase(unittest.TestCase):
# The processRequestMsg should fail but not abort.
try:
logout.processRequestMsg('passport=0&lasso=1', lasso.httpMethodRedirect)
- except SyntaxError:
+ except lasso.SyntaxError:
pass
else:
self.fail('Logout processRequestMsg should have failed.')
@@ -171,7 +170,7 @@ class LogoutTestCase(unittest.TestCase):
# The processResponseMsg should fail but not abort.
try:
logout.processResponseMsg('liberty=&alliance', lasso.httpMethodRedirect)
- except SyntaxError:
+ except lasso.SyntaxError:
pass
else:
self.fail('Logout processResponseMsg should have failed.')
@@ -209,7 +208,7 @@ class DefederationTestCase(unittest.TestCase):
# The processNotificationMsg should fail but not abort.
try:
defederation.processNotificationMsg('nonLibertyQuery=1', lasso.httpMethodRedirect)
- except SyntaxError:
+ except lasso.SyntaxError:
pass
else:
self.fail('Defederation processNotificationMsg should have failed.')