示例#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")
示例#2
0
def test_decode_raises_exception_if_consent_is_empty():
    with pytest.raises(Exception, match="Unable to process an empty consent"):
        decode("")
示例#3
0
def test_decode_raises_exception_if_consent_is_not_base64():
    with pytest.raises(ValueError):
        decode("@£$%^")
示例#4
0
def test_decode_v2(file):
    data = load_seed(file)
    assert decode(data["consent"]).version == 2