(funcopy, mock, sig)
| 206 | |
| 207 | |
| 208 | def _setup_func(funcopy, mock, sig): |
| 209 | funcopy.mock = mock |
| 210 | |
| 211 | def assert_called_with(*args, **kwargs): |
| 212 | return mock.assert_called_with(*args, **kwargs) |
| 213 | def assert_called(*args, **kwargs): |
| 214 | return mock.assert_called(*args, **kwargs) |
| 215 | def assert_not_called(*args, **kwargs): |
| 216 | return mock.assert_not_called(*args, **kwargs) |
| 217 | def assert_called_once(*args, **kwargs): |
| 218 | return mock.assert_called_once(*args, **kwargs) |
| 219 | def assert_called_once_with(*args, **kwargs): |
| 220 | return mock.assert_called_once_with(*args, **kwargs) |
| 221 | def assert_has_calls(*args, **kwargs): |
| 222 | return mock.assert_has_calls(*args, **kwargs) |
| 223 | def assert_any_call(*args, **kwargs): |
| 224 | return mock.assert_any_call(*args, **kwargs) |
| 225 | def reset_mock(): |
| 226 | funcopy.method_calls = _CallList() |
| 227 | funcopy.mock_calls = _CallList() |
| 228 | mock.reset_mock() |
| 229 | ret = funcopy.return_value |
| 230 | if _is_instance_mock(ret) and not ret is mock: |
| 231 | ret.reset_mock() |
| 232 | |
| 233 | funcopy.called = False |
| 234 | funcopy.call_count = 0 |
| 235 | funcopy.call_args = None |
| 236 | funcopy.call_args_list = _CallList() |
| 237 | funcopy.method_calls = _CallList() |
| 238 | funcopy.mock_calls = _CallList() |
| 239 | |
| 240 | funcopy.return_value = mock.return_value |
| 241 | funcopy.side_effect = mock.side_effect |
| 242 | funcopy._mock_children = mock._mock_children |
| 243 | |
| 244 | funcopy.assert_called_with = assert_called_with |
| 245 | funcopy.assert_called_once_with = assert_called_once_with |
| 246 | funcopy.assert_has_calls = assert_has_calls |
| 247 | funcopy.assert_any_call = assert_any_call |
| 248 | funcopy.reset_mock = reset_mock |
| 249 | funcopy.assert_called = assert_called |
| 250 | funcopy.assert_not_called = assert_not_called |
| 251 | funcopy.assert_called_once = assert_called_once |
| 252 | funcopy.__signature__ = sig |
| 253 | |
| 254 | mock._mock_delegate = funcopy |
| 255 | |
| 256 | |
| 257 | def _setup_async_mock(mock): |
no test coverage detected