def METHOD_NAME(app, workflow_id, data):
    """Calls to the workflow resolve endpoint.
    :param app: flask app to use
    :param workflow_id: id of the workflow to accept.
    :param action: action taken (normally on of 'reject', accept_core',
    'accept')
    """
    client = app.test_client()
    login_user_via_session(client, email='cataloger@inspirehep.net')
    return client.post(
        '/api/holdingpen/%s/action/resolve' % workflow_id,
        data=json.dumps(data),
        content_type='application/json',
    )