Esempio n. 1
0
def test_decode_raises_exception_if_consent_version_is_not_one_or_two():
    with pytest.raises(Exception,
                       match="Unable to process a consent with version 47"):
        decode("validbase64")
Esempio n. 2
0
def test_decode_raises_exception_if_consent_is_empty():
    with pytest.raises(Exception, match="Unable to process an empty consent"):
        decode("")
Esempio n. 3
0
def test_decode_raises_exception_if_consent_is_not_base64():
    with pytest.raises(ValueError):
        decode("@£$%^")
Esempio n. 4
0
def test_decode_v2(file):
    data = load_seed(file)
    assert decode(data["consent"]).version == 2