Ejemplo n.º 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())
Ejemplo n.º 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)
Ejemplo n.º 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)