From b6bdb0d33ed867e2d31a934280edeaa241978f18 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Thu, 10 Jun 2010 13:38:08 +0000 Subject: Tests: new python test for setEncryptionPrivateKeyWithPassword --- bindings/python/tests/binding_tests.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bindings/python') 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') -- cgit