From 86ac0a4f56d7c49e25fc5040405ab49e5ee58940 Mon Sep 17 00:00:00 2001 From: Eugenio Lacuesta Date: Wed, 10 Jul 2024 23:54:26 -0300 Subject: [PATCH] Update test --- tests/tests_asyncio/test_playwright_requests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/tests_asyncio/test_playwright_requests.py b/tests/tests_asyncio/test_playwright_requests.py index c9e8729..379c6bd 100644 --- a/tests/tests_asyncio/test_playwright_requests.py +++ b/tests/tests_asyncio/test_playwright_requests.py @@ -1,3 +1,4 @@ +import asyncio import json import logging import platform @@ -112,6 +113,7 @@ async def test_route_continue_exception(self, logger): async with make_handler({"PLAYWRIGHT_BROWSER_TYPE": self.browser_type}) as handler: scrapy_request = Request(url="https://example.org", method="GET") spider = Spider("foo") + initial_request_done = asyncio.Event() req_handler = handler._make_request_handler( context_name=DEFAULT_CONTEXT_NAME, method=scrapy_request.method, @@ -120,6 +122,7 @@ async def test_route_continue_exception(self, logger): body=None, encoding="utf-8", spider=spider, + initial_request_done=initial_request_done, ) route = MagicMock() playwright_request = AsyncMock()