

def send(self, url, method='GET', data=None, headers={
    
}):
    url_parsed = urlsplit(url)
    url = urlunsplit(('', '', url_parsed.path, url_parsed.query, url_parsed.fragment))
    headers = headers.copy()
    rv['Authorization'] = self.auth
    headers['Content-Type'] = 'application/json'
    headers['Accept'] = 'application/json'
    if data:
        data = json.dumps(data)
    with self.app.test_request_context(url, method=method, data=data, headers=headers):
        rv = self.app.preprocess_request()
        if (rv is None):
            rv = self.app.dispatch_request()
        rv = self.app.make_response(rv)
        rv = self.app.process_response(rv)
        return (rv, json.loads(rv.data.decode('utf-8')))

dataset/ETHPy150Open miguelgrinberg/oreilly-flask-apis-video/orders/tests/test_client.py TestClient.send/VarMisuse@65/79 `headers`->`rv`