示例#1
0
def test_decrypt_expire_with_invalid_text():
    try:
        crypto.decrypt_with_expire('092:daf.dae.<d', 1)
    except crypto.BadEncryptedText:
        pass
    else:
        raise Exception("Decrypt a random string with NO error")
示例#2
0
def test_decrypt_expire_with_invalid_text():
    try:
        crypto.decrypt_with_expire('092:daf.dae.<d', 1)
    except crypto.BadEncryptedText:
        pass
    else:
        raise Exception("Decrypt a random string with NO error")
示例#3
0
def test_crypto_expire_with_right_case():
    original = 'abcd:1234:)()xxx'
    text = crypto.encrypt_with_expire(original)
    assert crypto.decrypt_with_expire(text, 1) == original
示例#4
0
def test_crypto_expire_with_right_case():
    original = 'abcd:1234:)()xxx'
    text = crypto.encrypt_with_expire(original)
    assert crypto.decrypt_with_expire(text, 1) == original