From e31b45fa9e7b24b9c646470759a4eecb0a6a2e10 Mon Sep 17 00:00:00 2001 From: Shroominic Date: Fri, 13 Mar 2026 18:51:30 +0800 Subject: [PATCH] test: type dummy async client exit hook --- tests/unit/test_upstream_routstr.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_upstream_routstr.py b/tests/unit/test_upstream_routstr.py index d544fb2e..8cb2427d 100644 --- a/tests/unit/test_upstream_routstr.py +++ b/tests/unit/test_upstream_routstr.py @@ -1,3 +1,4 @@ +from types import TracebackType from unittest.mock import Mock import httpx @@ -15,7 +16,12 @@ class DummyAsyncClient: async def __aenter__(self) -> "DummyAsyncClient": return self - async def __aexit__(self, exc_type, exc, tb) -> bool: + async def __aexit__( + self, + exc_type: type[BaseException] | None, + exc: BaseException | None, + tb: TracebackType | None, + ) -> bool: return False async def get(