bpo-38136: Updates await_count and call_count to be different things (GH-16192)

This commit is contained in:
Lisa Roach 2019-09-23 20:49:40 -07:00 committed by GitHub
parent 6f53d34fb0
commit ef04851775
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 208 additions and 43 deletions

View file

@ -850,6 +850,7 @@ class MockTest(unittest.TestCase):
def test_setting_call(self):
mock = Mock()
def __call__(self, a):
self._increment_mock_call(a)
return self._mock_call(a)
type(mock).__call__ = __call__
@ -2025,7 +2026,7 @@ class MockTest(unittest.TestCase):
)
mocks = [
Mock, MagicMock, NonCallableMock, NonCallableMagicMock
Mock, MagicMock, NonCallableMock, NonCallableMagicMock, AsyncMock
]
for mock in mocks: