Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_temporary_keychain(self):
"""Test that a temporary keychain can be created, read and destroyed."""
keychain = keyper.Keychain.create_temporary()
self.assertIsNotNone(keychain.path)
self.assertIsNotNone(keychain.password)
self.assertTrue(os.path.exists(keychain.path))
self.assertTrue(keychain.is_temporary)
keychain.delete_temporary()
self.assertFalse(os.path.exists(keychain.path))