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