From 45bee45332f9edbbae0c931fd610b2e8c41d6519 Mon Sep 17 00:00:00 2001 From: Niccolum Date: Mon, 4 Jul 2022 09:48:37 +0300 Subject: [PATCH] add 3.7 support --- src/pytest_mock/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pytest_mock/plugin.py b/src/pytest_mock/plugin.py index 0d2ac31..6b0ce72 100644 --- a/src/pytest_mock/plugin.py +++ b/src/pytest_mock/plugin.py @@ -173,7 +173,7 @@ def async_stub(self, name: Optional[str] = None) -> AsyncMockType: :return: Stub object. """ return cast( - unittest.mock.AsyncMock, + AsyncMockType, self.mock_module.AsyncMock(spec=lambda *args, **kwargs: None, name=name), )