[mock] take an iterable of calls for assert_has_awaits(#10337)

This commit is contained in:
FasterSpeeding
2023-06-21 02:21:05 +01:00
committed by GitHub
parent f1543903c6
commit a46fe43477

View File

@@ -1,5 +1,5 @@
from _typeshed import Incomplete
from collections.abc import Callable, Coroutine, Mapping, Sequence
from collections.abc import Callable, Coroutine, Iterable, Mapping, Sequence
from contextlib import AbstractContextManager
from types import TracebackType
from typing import Any, Generic, TypeVar, overload
@@ -316,7 +316,7 @@ class AsyncMockMixin(Base):
def assert_awaited_with(_mock_self, *args: Any, **kwargs: Any) -> None: ...
def assert_awaited_once_with(_mock_self, *args: Any, **kwargs: Any) -> None: ...
def assert_any_await(_mock_self, *args: Any, **kwargs: Any) -> None: ...
def assert_has_awaits(_mock_self, calls: _CallList, any_order: bool = False) -> None: ...
def assert_has_awaits(_mock_self, calls: Iterable[_Call], any_order: bool = False) -> None: ...
def assert_not_awaited(_mock_self) -> None: ...
def reset_mock(self, *args: Any, **kwargs: Any) -> None: ...
await_count: int