コード例 #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)