def test_unsuccessful_response():
    user, attributes = verify_cas3_response(FAILURE_RESPONSE)
    assert user is None
    assert not attributes
def test_successful_response_verification_with_attributes():
    user, attributes = verify_cas3_response(SUCCESS_RESPONSE_WITH_ATTRIBUTES)

    assert user == '*****@*****.**'
    assert attributes['foo'] == 'bar'
    assert attributes['baz'] == '1234'
def test_basic_successful_response_verification():
    user, attributes = verify_cas3_response(SUCCESS_RESPONSE)

    assert user == '*****@*****.**'
    assert not attributes
def test_unsuccessful_response():
    user, attributes = verify_cas3_response(FAILURE_RESPONSE)
    assert user is None
    assert not attributes
def test_successful_response_verification_with_attributes():
    user, attributes = verify_cas3_response(SUCCESS_RESPONSE_WITH_ATTRIBUTES)

    assert user == '*****@*****.**'
    assert attributes['foo'] == 'bar'
    assert attributes['baz'] == '1234'
def test_basic_successful_response_verification():
    user, attributes = verify_cas3_response(SUCCESS_RESPONSE)

    assert user == '*****@*****.**'
    assert not attributes