diff options
| author | Emmanuel Raviart <eraviart@entrouvert.com> | 2004-08-27 14:41:09 +0000 |
|---|---|---|
| committer | Emmanuel Raviart <eraviart@entrouvert.com> | 2004-08-27 14:41:09 +0000 |
| commit | 497181fc6a44388a91af7f08dbe411977e75c083 (patch) | |
| tree | ad6b587bf01cce9f2718270061c75ee0f020eafe /python/tests | |
| parent | eaa4b813fcd0f7aa1152d98998afe5b59556142f (diff) | |
| download | lasso-497181fc6a44388a91af7f08dbe411977e75c083.tar.gz lasso-497181fc6a44388a91af7f08dbe411977e75c083.tar.xz lasso-497181fc6a44388a91af7f08dbe411977e75c083.zip | |
Corrected SWIG binding.
Corrected Python tests.
Diffstat (limited to 'python/tests')
| -rw-r--r-- | python/tests/login_tests.py | 21 |
1 files changed, 19 insertions, 2 deletions
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') |
