From b3a19cecc552a22a42098b6afba109d98c1007c3 Mon Sep 17 00:00:00 2001 From: Alex Streed Date: Wed, 19 Jun 2024 16:02:29 -0500 Subject: [PATCH] Reduce scope of mock patch to prevent crosstalk --- tests/client/test_base_client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/client/test_base_client.py b/tests/client/test_base_client.py index 9e36eeb79834..dbb9d9341cb2 100644 --- a/tests/client/test_base_client.py +++ b/tests/client/test_base_client.py @@ -538,7 +538,9 @@ async def mocked_client( responses: List[Response], **client_kwargs: Dict[str, Any], ) -> AsyncGenerator[Tuple[PrefectHttpxAsyncClient, mock.AsyncMock], None]: - with mock.patch("httpx.AsyncClient.send", autospec=True) as send: + with mock.patch( + "prefect.client.base.httpx.AsyncClient.send", autospec=True + ) as send: send.side_effect = responses client = PrefectHttpxAsyncClient(**client_kwargs) async with client: