From 497181fc6a44388a91af7f08dbe411977e75c083 Mon Sep 17 00:00:00 2001 From: Emmanuel Raviart Date: Fri, 27 Aug 2004 14:41:09 +0000 Subject: Corrected SWIG binding. Corrected Python tests. --- python/tests/login_tests.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'python/tests') diff --git a/python/tests/login_tests.py b/python/tests/login_tests.py index 4ecb7b25..614ea4cc 100644 --- a/python/tests/login_tests.py +++ b/python/tests/login_tests.py @@ -43,7 +43,24 @@ except NameError: class LoginTestCase(unittest.TestCase): - pass + def test01(self): + """SP login; testing access to authentication request.""" + + 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) + lassoServer.add_provider( + os.path.join(dataDir, 'idp1-la/metadata.xml'), + os.path.join(dataDir, 'idp1-la/public-key.pem'), + os.path.join(dataDir, 'idp1-la/certificate.pem')) + login = lasso.Login(lassoServer) + login.init_authn_request(lasso.httpMethodRedirect) + self.failUnlessEqual(login.request_type, lasso.messageTypeAuthnRequest) + login.authn_request + login.authn_request.set_protocolProfile(lasso.libProtocolProfileBrwsArt) class LogoutTestCase(unittest.TestCase): @@ -107,7 +124,7 @@ class DefederationTestCase(unittest.TestCase): except lasso.Error, error: pass else: - fail('Defederation process_notification_msg should have failed.') + self.fail('Defederation process_notification_msg should have failed.') suite1 = unittest.makeSuite(LoginTestCase, 'test') -- cgit