Fix assert_has_calls() signature (#3967)

See the docs https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.assert_has_calls
This commit is contained in:
Ivan Levkivskyi
2020-05-05 19:20:56 +01:00
committed by GitHub
parent 8c7f489d1b
commit 5342d66dcc
2 changed files with 4 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
# Stubs for mock
import sys
from typing import Any, List, Optional, Text, Tuple, Type, TypeVar
from typing import Any, List, Optional, Sequence, Text, Tuple, Type, TypeVar
_T = TypeVar("_T")
@@ -101,7 +101,7 @@ class NonCallableMock(Base, Any): # type: ignore
def _get_call_signature_from_name(self, name: str) -> Any: ...
def assert_any_call(self, *args: Any, **kwargs: Any) -> None: ...
def assert_has_calls(self, calls: _CallList, any_order: bool = ...) -> None: ...
def assert_has_calls(self, calls: Sequence[_Call], any_order: bool = ...) -> None: ...
def mock_add_spec(self, spec: Any, spec_set: bool = ...) -> None: ...
def _mock_add_spec(self, spec: Any, spec_set, _spec_as_instance: bool = ..., _eat_self: bool = ...) -> None: ...
def attach_mock(self, mock: NonCallableMock, attribute: str) -> None: ...

View File

@@ -1,7 +1,7 @@
# Stubs for mock
import sys
from typing import Any, List, Optional, Text, Tuple, Type, TypeVar
from typing import Any, List, Optional, Sequence, Text, Tuple, Type, TypeVar
_T = TypeVar("_T")
@@ -101,7 +101,7 @@ class NonCallableMock(Base, Any): # type: ignore
def _get_call_signature_from_name(self, name: str) -> Any: ...
def assert_any_call(self, *args: Any, **kwargs: Any) -> None: ...
def assert_has_calls(self, calls: _CallList, any_order: bool = ...) -> None: ...
def assert_has_calls(self, calls: Sequence[_Call], any_order: bool = ...) -> None: ...
def mock_add_spec(self, spec: Any, spec_set: bool = ...) -> None: ...
def _mock_add_spec(self, spec: Any, spec_set, _spec_as_instance: bool = ..., _eat_self: bool = ...) -> None: ...
def attach_mock(self, mock: NonCallableMock, attribute: str) -> None: ...