Esempio n. 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)
Esempio n. 2
0
def test_cookie_signature():
    key = b'1234567890abcdef'
    parts = ['abc', 'def']
    sig = cookie_signature(key, *parts)
    assert verify_cookie_signature(sig, key, *parts)
Esempio n. 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)
Esempio n. 4
0
def test_cookie_signature():
    key = b"1234567890abcdef"
    parts = ["abc", "def"]
    sig = cookie_signature(key, *parts)
    assert verify_cookie_signature(sig, key, *parts)
Esempio n. 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)
Esempio n. 6
0
def test_cookie_signature():
    key = b'1234567890abcdef'
    parts = ['abc', 'def']
    sig = cookie_signature(key, *parts)
    assert verify_cookie_signature(sig, key, *parts)