예제 #1
0
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
예제 #2
0
파일: test_vault.py 프로젝트: 0xcd03/inbox
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
예제 #3
0
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
예제 #4
0
파일: test_vault.py 프로젝트: 0xcd03/inbox
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
예제 #5
0
파일: generic.py 프로젝트: rbs-pli/inbox
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)