def test_client_slow(serve, client_app=None): if client_app is None: client_app = SendRequest() if not client_app._timeout_supported(client_app.HTTPConnection): # timeout isn't supported return with serve(slow_app) as server: req = Request.blank(server.url) req.environ["webob.client.timeout"] = 0.1 resp = req.send(client_app) assert resp.status_code == 504, resp.status
def test_client_slow(client_app=None): if client_app is None: client_app = SendRequest() if not client_app._timeout_supported(client_app.HTTPConnection): # timeout isn't supported return with serve(slow_app) as server: req = Request.blank(server.url) req.environ["webob.client.timeout"] = 0.1 resp = req.send(client_app) assert resp.status_code == 504, resp.status