How to use the keyper.Keychain function in keyper

To help you get started, we’ve selected a few keyper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / keyper / tests / test_keychain.py View on Github external
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))