def test_many(): """Add and remove many times in a row.""" start = time() for i in range(10): secret_id = vault.put(TV) assert vault.get(secret_id) == TV vault.remove(secret_id) print "time: ", time() - start
def test_simple(): """Add, get and remove a test value, make sure value is removed""" secret_id = vault.put(TV) assert vault.get(secret_id) == TV vault.remove(secret_id) # Make sure the value is actually removed found = None try: found = vault.get(secret_id) except NotFound: pass assert not found
def _after_genericaccount_update(mapper, connection, target): """ Hook to cascade delete the refresh_token as it may be remote (and usual ORM mechanisms don't apply).""" if target.deleted_at: vault.remove(target.password_id)