Searched refs:mock_method (Results 1 – 6 of 6) sorted by relevance
/external/python/cpython3/Lib/unittest/test/testmock/ |
D | testasync.py | 59 def test_async(mock_method): argument 60 self.assertTrue(iscoroutinefunction(mock_method)) 65 def test_async(mock_method): argument 66 m = mock_method() 71 def test_no_parent_attribute(mock_method): argument 72 m = mock_method() 81 def test_async(mock_method): argument 82 self.assertIsInstance(mock_method, AsyncMock) 88 def test_async(mock_method): argument 89 self.assertIsInstance(mock_method, AsyncMock) [all …]
|
D | testmock.py | 1593 mock_method = mock.create_autospec(getattr(TestClass, method)) 1594 mock_method() 1595 mock_method.assert_called_once_with() 1596 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) 1560 ... def test(mock_method): 1562 ... mock_method.assert_called_with(3)
|