Esempio n. 1
0
def test_serialize_samesite():
    assert cookies.serialize_samesite(b"Lax") == b"Lax"
    assert cookies.serialize_samesite(b"Strict") == b"Strict"
    assert cookies.serialize_samesite(b"None") == b"None"

    with pytest.raises(ValueError):
        cookies.serialize_samesite(b"SomethingElse")
Esempio n. 2
0
def test_serialize_samesite():
    assert cookies.serialize_samesite(b"Lax") == b"Lax"
    assert cookies.serialize_samesite(b"Strict") == b"Strict"

    with pytest.raises(ValueError):
        cookies.serialize_samesite(b"SomethingElse")