def send_api_data(apiuser_with_custom_defaults, simple_sig_auth_credentials):
    """
    Pytest fixture. Returns a helper function that sends API data via
    the provided `api_client`, to the provided `url`, with the given
    `req_body`, via the given HTTP `method`. An API user is created and
    used for authentication. You may optionally supply a `content_type`
    string; if not supplied, then JSON is assumed by default (or
    json-patch for patch requests). The response object is returned.
    """
    content_types = {
        'put': 'application/json',
        'patch': 'application/json-patch+json',
        'post': 'application/json'
    }

    def _send_api_data(api_client, url, req_body, method, content_type=None):
        test_cls = apiuser_with_custom_defaults()
        api_user = test_cls.objects.create_user('test', 'sec', password='pw',
                                                email='test@test.com',
                                                first_name='F', last_name='L')
        content_type = content_type or content_types[method]
        api_client.credentials(**simple_sig_auth_credentials(api_user,
                                                             req_body))
        do_send = getattr(api_client, method)
        resp = do_send(url, req_body, content_type=content_type)
        api_client.credentials()
        return resp
    return _send_api_data