Example #1
0
 def test_lock(self):
     s = Secret(self.c)
     s.create(self.TEST_PASSPHRASE, reinitialize=True)
     s.unlock(self.TEST_PASSPHRASE)
     self.assertTrue(s.unlocked())
     s.lock()
     self.assertFalse(s.unlocked())
Example #2
0
 def test_unlock_wrong_pass(self):
     s = Secret(self.c)
     s.create(self.TEST_PASSPHRASE, reinitialize=True)
     self.assertEqual(s.unlock('bar'), SecretStatus.OPENSSL_ERROR)
Example #3
0
 def test_unlock(self):
     s = Secret(self.c)
     s.create(self.TEST_PASSPHRASE, reinitialize=True)
     self.assertEqual(s.unlock(self.TEST_PASSPHRASE), SecretStatus.OK)