From c8a821afef28d840ea54fca549c01b437101ae34 Mon Sep 17 00:00:00 2001 From: Emmanuel Raviart Date: Wed, 29 Sep 2004 22:08:53 +0000 Subject: Updates Python tests to new Lasso API. --- python/tests/errorchecking_tests.py | 7 +++---- python/tests/profiles_tests.py | 40 +++++++++++++++---------------------- 2 files changed, 19 insertions(+), 28 deletions(-) (limited to 'python') diff --git a/python/tests/errorchecking_tests.py b/python/tests/errorchecking_tests.py index a27ee9ec..01a35b71 100644 --- a/python/tests/errorchecking_tests.py +++ b/python/tests/errorchecking_tests.py @@ -61,13 +61,12 @@ class ErrorCheckingTestCase(unittest.TestCase): # initFromAuthnRequestMsg; surely it shouldn't segfault server = 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) + None, + os.path.join(dataDir, 'idp1-la/certificate.pem')) login = lasso.Login(server) try: - login.initFromAuthnRequestMsg("", lasso.httpMethodRedirect) + login.processAuthnRequestMsg("", lasso.httpMethodRedirect) except lasso.Error: pass diff --git a/python/tests/profiles_tests.py b/python/tests/profiles_tests.py index bfbbd79e..9607a7e1 100755 --- a/python/tests/profiles_tests.py +++ b/python/tests/profiles_tests.py @@ -48,10 +48,9 @@ class ServerTestCase(unittest.TestCase): lassoServer = lasso.Server( os.path.join(dataDir, 'sp1-la/metadata.xml'), - None, # os.path.join(dataDir, 'sp1-la/public-key.pem') is no more used os.path.join(dataDir, 'sp1-la/private-key-raw.pem'), - os.path.join(dataDir, 'sp1-la/certificate.pem'), - lasso.signatureMethodRsaSha1) + None, + os.path.join(dataDir, 'sp1-la/certificate.pem')) lassoServer.addProvider( os.path.join(dataDir, 'idp1-la/metadata.xml'), os.path.join(dataDir, 'idp1-la/public-key.pem'), @@ -78,10 +77,9 @@ class LoginTestCase(unittest.TestCase): lassoServer = lasso.Server( os.path.join(dataDir, 'sp1-la/metadata.xml'), - None, # os.path.join(dataDir, 'sp1-la/public-key.pem') is no more used os.path.join(dataDir, 'sp1-la/private-key-raw.pem'), - os.path.join(dataDir, 'sp1-la/certificate.pem'), - lasso.signatureMethodRsaSha1) + None, + os.path.join(dataDir, 'sp1-la/certificate.pem')) lassoServer.addProvider( os.path.join(dataDir, 'idp1-la/metadata.xml'), os.path.join(dataDir, 'idp1-la/public-key.pem'), @@ -98,10 +96,9 @@ class LogoutTestCase(unittest.TestCase): lassoServer = lasso.Server( os.path.join(dataDir, 'sp1-la/metadata.xml'), - None, # os.path.join(dataDir, 'sp1-la/public-key.pem') is no more used os.path.join(dataDir, 'sp1-la/private-key-raw.pem'), - os.path.join(dataDir, 'sp1-la/certificate.pem'), - lasso.signatureMethodRsaSha1) + None, + os.path.join(dataDir, 'sp1-la/certificate.pem')) lassoServer.addProvider( os.path.join(dataDir, 'idp1-la/metadata.xml'), os.path.join(dataDir, 'idp1-la/public-key.pem'), @@ -120,10 +117,9 @@ class LogoutTestCase(unittest.TestCase): 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) + None, + os.path.join(dataDir, 'idp1-la/certificate.pem')) lassoServer.addProvider( os.path.join(dataDir, 'sp1-la/metadata.xml'), os.path.join(dataDir, 'sp1-la/public-key.pem'), @@ -136,10 +132,9 @@ class LogoutTestCase(unittest.TestCase): 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) + None, + os.path.join(dataDir, 'idp1-la/certificate.pem')) lassoServer.addProvider( os.path.join(dataDir, 'sp1-la/metadata.xml'), os.path.join(dataDir, 'sp1-la/public-key.pem'), @@ -158,10 +153,9 @@ class LogoutTestCase(unittest.TestCase): 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) + None, + os.path.join(dataDir, 'idp1-la/certificate.pem')) lassoServer.addProvider( os.path.join(dataDir, 'sp1-la/metadata.xml'), os.path.join(dataDir, 'sp1-la/public-key.pem'), @@ -180,10 +174,9 @@ class LogoutTestCase(unittest.TestCase): 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) + None, + os.path.join(dataDir, 'idp1-la/certificate.pem')) lassoServer.addProvider( os.path.join(dataDir, 'sp1-la/metadata.xml'), os.path.join(dataDir, 'sp1-la/public-key.pem'), @@ -196,10 +189,9 @@ class DefederationTestCase(unittest.TestCase): 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) + None, + os.path.join(dataDir, 'idp1-la/certificate.pem')) lassoServer.addProvider( os.path.join(dataDir, 'sp1-la/metadata.xml'), os.path.join(dataDir, 'sp1-la/public-key.pem'), -- cgit