From 9560050946efd1309089aee53e12a7e0d50f7dfd Mon Sep 17 00:00:00 2001 From: Shroominic Date: Fri, 13 Mar 2026 19:08:45 +0800 Subject: [PATCH] test: type routstr topup async client mock --- tests/integration/test_provider_management.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_provider_management.py b/tests/integration/test_provider_management.py index b9d287f6..b7db0c6c 100644 --- a/tests/integration/test_provider_management.py +++ b/tests/integration/test_provider_management.py @@ -4,6 +4,7 @@ Tests GET /v1/providers/ endpoint for listing and managing providers. """ import time +from types import TracebackType from typing import Any, Generator from unittest.mock import patch @@ -714,13 +715,18 @@ async def test_admin_routstr_topup_retries_transient_upstream_failure( return self._data class MockAsyncClient: - def __init__(self): + def __init__(self) -> None: self.calls = 0 async def __aenter__(self) -> "MockAsyncClient": return self - async def __aexit__(self, exc_type, exc, tb) -> None: + async def __aexit__( + self, + exc_type: type[BaseException] | None, + exc: BaseException | None, + tb: TracebackType | None, + ) -> None: return None async def post(