diff --git a/local-requirements.txt b/local-requirements.txt index 3243c809e..f18ac4f91 100644 --- a/local-requirements.txt +++ b/local-requirements.txt @@ -18,7 +18,7 @@ pytest-xdist==3.5.0 requests==2.31.0 service_identity==24.1.0 setuptools==69.1.1 -twisted==23.10.0 +twisted==24.3.0 types-pyOpenSSL==24.0.0.20240228 types-requests==2.31.0.20240218 wheel==0.41.2 diff --git a/tests/async/test_fetch_browser_context.py b/tests/async/test_fetch_browser_context.py index 2c515697b..695b140b7 100644 --- a/tests/async/test_fetch_browser_context.py +++ b/tests/async/test_fetch_browser_context.py @@ -55,7 +55,7 @@ async def test_fetch_should_work(context: BrowserContext, server: Server) -> Non async def test_should_throw_on_network_error( context: BrowserContext, server: Server ) -> None: - server.set_route("/test", lambda request: request.transport.loseConnection()) + server.set_route("/test", lambda request: request.loseConnection()) with pytest.raises(Error, match="socket hang up"): await context.request.fetch(server.PREFIX + "/test") diff --git a/tests/async/test_har.py b/tests/async/test_har.py index d039273cc..b7875ea35 100644 --- a/tests/async/test_har.py +++ b/tests/async/test_har.py @@ -760,7 +760,7 @@ async def test_should_ignore_aborted_requests( tmpdir: Path, ) -> None: path = tmpdir / "test.har" - server.set_route("/x", lambda request: request.transport.loseConnection()) + server.set_route("/x", lambda request: request.loseConnection()) context1 = await context_factory() await context1.route_from_har(har=path, update=True) page1 = await context1.new_page() diff --git a/tests/async/test_network.py b/tests/async/test_network.py index 486a98914..458a0a118 100644 --- a/tests/async/test_network.py +++ b/tests/async/test_network.py @@ -633,7 +633,7 @@ async def test_network_events_request_failed( ) -> None: def handle_request(request: TestServerRequest) -> None: request.setHeader("Content-Type", "text/css") - request.transport.loseConnection() + request.loseConnection() server.set_route("/one-style.css", handle_request) diff --git a/tests/sync/test_fetch_browser_context.py b/tests/sync/test_fetch_browser_context.py index 5a8b38769..dd10d5adf 100644 --- a/tests/sync/test_fetch_browser_context.py +++ b/tests/sync/test_fetch_browser_context.py @@ -52,7 +52,7 @@ def test_fetch_should_work(context: BrowserContext, server: Server) -> None: def test_should_throw_on_network_error(context: BrowserContext, server: Server) -> None: - server.set_route("/test", lambda request: request.transport.loseConnection()) + server.set_route("/test", lambda request: request.loseConnection()) with pytest.raises(Error, match="socket hang up"): context.request.fetch(server.PREFIX + "/test")