Searched refs:mock_method (Results 1 – 6 of 6) sorted by relevance
/external/python/cpython3/Lib/unittest/test/testmock/ |
D | testasync.py | 47 def test_async(mock_method): argument 48 self.assertTrue(asyncio.iscoroutinefunction(mock_method)) 53 def test_async(mock_method): argument 54 m = mock_method() 59 def test_no_parent_attribute(mock_method): argument 60 m = mock_method() 69 def test_async(mock_method): argument 70 self.assertIsInstance(mock_method, AsyncMock) 86 with patch.object(AsyncClass, 'async_method') as mock_method: 87 self.assertTrue(asyncio.iscoroutinefunction(mock_method)) [all …]
|
D | testmock.py | 1534 mock_method = mock.create_autospec(getattr(TestClass, method)) 1535 mock_method() 1536 mock_method.assert_called_once_with() 1537 self.assertRaises(TypeError, mock_method, 'extra_arg')
|
/external/protobuf/python/ |
D | mox.py | 500 mock_method = self._CreateMockMethod('__call__') 501 return mock_method(*params, **named_params) 1194 def AddMethod(self, mock_method): argument 1197 def MethodCalled(self, mock_method): argument 1214 def AddMethod(self, mock_method): argument 1221 self._methods.append(mock_method) 1223 def MethodCalled(self, mock_method): argument 1242 if method == mock_method: 1247 self._methods.remove(mock_method) 1251 mock_method._call_queue.appendleft(self) [all …]
|
/external/python/mock/mock/tests/ |
D | testmock.py | 1513 mock_method = mock.create_autospec(getattr(TestClass, method)) 1514 mock_method() 1515 mock_method.assert_called_once_with() 1516 self.assertRaises(TypeError, mock_method, 'extra_arg')
|
/external/python/cpython3/Doc/library/ |
D | unittest.mock-examples.rst | 441 ... def test_something(self, mock_method): 443 ... mock_method.assert_called_with() 483 >>> with patch.object(ProductionClass, 'method') as mock_method: 484 ... mock_method.return_value = None 488 >>> mock_method.assert_called_with(1, 2, 3)
|
D | unittest.mock.rst | 128 >>> with patch.object(ProductionClass, 'method', return_value=None) as mock_method: 132 >>> mock_method.assert_called_once_with(1, 2, 3) 1556 ... def test(mock_method): 1558 ... mock_method.assert_called_with(3)
|