diff options
author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-06-10 13:38:08 +0000 |
---|---|---|
committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2010-06-10 13:38:08 +0000 |
commit | b6bdb0d33ed867e2d31a934280edeaa241978f18 (patch) | |
tree | d8a16aa8d2cbb1001ba6e4868247044a0810e92b /bindings | |
parent | 2f7723348db726351a1bbb529779ba2a2cbb6b61 (diff) | |
download | lasso-b6bdb0d33ed867e2d31a934280edeaa241978f18.tar.gz lasso-b6bdb0d33ed867e2d31a934280edeaa241978f18.tar.xz lasso-b6bdb0d33ed867e2d31a934280edeaa241978f18.zip |
Tests: new python test for setEncryptionPrivateKeyWithPassword
Diffstat (limited to 'bindings')
-rwxr-xr-x | bindings/python/tests/binding_tests.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bindings/python/tests/binding_tests.py b/bindings/python/tests/binding_tests.py index 8609a1ae..3e3dd36e 100755 --- a/bindings/python/tests/binding_tests.py +++ b/bindings/python/tests/binding_tests.py @@ -274,6 +274,18 @@ class BindingTestCase(unittest.TestCase): identity.federations['http://idp1.lasso.lan'].localNameIdentifier.content, 'first name id') + def test10(self): + '''Test Server.setEncryptionPrivateKeyWithPassword''' + pkey_path = os.path.join( + dataDir, 'idp5-saml2', 'private-key.pem') + server = lasso.Server(os.path.join(dataDir, 'idp5-saml2', 'metadata.xml'), + pkey_path) + # from file + server.setEncryptionPrivateKeyWithPassword(pkey_path) + # from buffer + server.setEncryptionPrivateKeyWithPassword(open(pkey_path).read()) + # reset + server.setEncryptionPrivateKeyWithPassword() bindingSuite = unittest.makeSuite(BindingTestCase, 'test') |