

def __init__(self, app, url='/', method='GET', protocol='HTTP/1.1', headers=None, scheme='http', remote_address=('127.0.0.1', 99)):
    connection = MagicMock()
    connection.server = MagicMock()
    connection.server.xheaders = False
    connection.server.cookie_secret = '1234567890'
    app.remote_address = remote_address
    connection.write = MagicMock()
    connection.finish = MagicMock()
    self.request = HTTPRequest(connection, method, url, protocol, headers, scheme)
    self.request.auto_finish = True
    self.app = app
    self.stack = []
    with self:
        self.result = self.app.route_request(self.request)

dataset/ETHPy150Open ecdavis/pants/pants/test/web/test_web_application.py RequestContext.__init__/VarMisuse@70/99 `connection`->`app`