예제 #1
0
def test_broken_cookie_signature():
    key = b'1234567890abcdef'
    parts = ['abc', 'def']
    sig = cookie_signature(key, *parts)
    parts.reverse()
    assert not verify_cookie_signature(sig, key, *parts)
예제 #2
0
def test_cookie_signature():
    key = b'1234567890abcdef'
    parts = ['abc', 'def']
    sig = cookie_signature(key, *parts)
    assert verify_cookie_signature(sig, key, *parts)
예제 #3
0
def test_broken_cookie_signature():
    key = b"1234567890abcdef"
    parts = ["abc", "def"]
    sig = cookie_signature(key, *parts)
    parts.reverse()
    assert not verify_cookie_signature(sig, key, *parts)
예제 #4
0
def test_cookie_signature():
    key = b"1234567890abcdef"
    parts = ["abc", "def"]
    sig = cookie_signature(key, *parts)
    assert verify_cookie_signature(sig, key, *parts)
예제 #5
0
def test_broken_cookie_signature():
    key = b'1234567890abcdef'
    parts = ['abc', 'def']
    sig = cookie_signature(key, *parts)
    parts.reverse()
    assert not verify_cookie_signature(sig, key, *parts)
예제 #6
0
def test_cookie_signature():
    key = b'1234567890abcdef'
    parts = ['abc', 'def']
    sig = cookie_signature(key, *parts)
    assert verify_cookie_signature(sig, key, *parts)