def METHOD_NAME(
    self, token_method, http_session, token_response
):
    del token_response["access_token"]
    http_session.send.return_value = factories.requests.Response(
        status_code=200, json_data=dict(token_response)
    )
    with pytest.raises(CanvasAPIServerError):
        token_method("code")