Lines Matching refs:kwargs
300 def assert_called_with(*args, **kwargs): argument
301 return mock.assert_called_with(*args, **kwargs)
302 def assert_called_once_with(*args, **kwargs): argument
303 return mock.assert_called_once_with(*args, **kwargs)
304 def assert_has_calls(*args, **kwargs): argument
305 return mock.assert_has_calls(*args, **kwargs)
306 def assert_any_call(*args, **kwargs): argument
307 return mock.assert_any_call(*args, **kwargs)
460 def __init__(self, *args, **kwargs): argument
480 **kwargs argument
509 if kwargs:
510 self.configure_mock(**kwargs)
631 def configure_mock(self, **kwargs): argument
640 for arg, val in sorted(kwargs.items(),
808 def _format_mock_call_signature(self, args, kwargs): argument
810 return _format_call_signature(name, args, kwargs)
813 def _format_mock_failure_message(self, args, kwargs): argument
815 expected_string = self._format_mock_call_signature(args, kwargs)
823 def assert_called_with(_mock_self, *args, **kwargs): argument
830 expected = self._format_mock_call_signature(args, kwargs)
833 if self.call_args != (args, kwargs):
834 msg = self._format_mock_failure_message(args, kwargs)
838 def assert_called_once_with(_mock_self, *args, **kwargs): argument
846 return self.assert_called_with(*args, **kwargs)
881 def assert_any_call(self, *args, **kwargs): argument
887 kall = call(*args, **kwargs)
889 expected_string = self._format_mock_call_signature(args, kwargs)
935 _spec_state=None, _new_name='', _new_parent=None, **kwargs): argument
940 _spec_state, _new_name, _new_parent, **kwargs
946 def _mock_check_sig(self, *args, **kwargs): argument
951 def __call__(_mock_self, *args, **kwargs): argument
954 _mock_self._mock_check_sig(*args, **kwargs)
955 return _mock_self._mock_call(*args, **kwargs)
958 def _mock_call(_mock_self, *args, **kwargs): argument
962 self.call_args = _Call((args, kwargs), two=True)
963 self.call_args_list.append(_Call((args, kwargs), two=True))
967 self.mock_calls.append(_Call(('', args, kwargs)))
974 this_mock_call = _Call((_new_name, args, kwargs))
990 this_method_call = _Call((name, args, kwargs))
1018 ret_val = effect(*args, **kwargs)
1024 return self._mock_wraps(*args, **kwargs)
1118 spec_set, autospec, new_callable, kwargs argument
1139 self.kwargs = kwargs
1147 self.autospec, self.new_callable, self.kwargs
1250 autospec, kwargs = self.autospec, self.kwargs
1317 _kwargs.update(kwargs)
1349 _name=self.attribute, **kwargs)
1350 elif kwargs:
1421 new_callable=None, **kwargs argument
1442 spec_set, autospec, new_callable, kwargs
1447 autospec=None, new_callable=None, **kwargs): argument
1473 if not kwargs:
1478 items = list(kwargs.items())
1497 spec_set=None, autospec=None, new_callable=None, **kwargs argument
1567 spec_set, autospec, new_callable, kwargs
1600 def __init__(self, in_dict, values=(), clear=False, **kwargs): argument
1606 self.values.update(kwargs)
1917 def __call__(self, *args, **kwargs): argument
1919 return m(*args, **kwargs)
1951 def _format_call_signature(name, args, kwargs): argument
1956 '%s=%r' % (key, value) for key, value in kwargs.items()
1992 kwargs = {}
1995 name, args, kwargs = value
2003 kwargs = second
2005 args, kwargs = first, second
2013 kwargs = value
2016 return tuple.__new__(cls, (args, kwargs))
2018 return tuple.__new__(cls, (name, args, kwargs))
2082 def __call__(self, *args, **kwargs): argument
2084 return _Call(('', args, kwargs), name='()')
2087 return _Call((self.name, args, kwargs), name=name, parent=self)
2106 args, kwargs = self
2108 name, args, kwargs = self
2115 return _format_call_signature(name, args, kwargs)
2136 _name=None, **kwargs): argument
2168 _kwargs.update(kwargs)
2198 if is_type and not instance and 'return_value' not in kwargs:
2225 kwargs = {'spec': original}
2227 kwargs = {'spec_set': original}
2238 _new_parent=parent, **kwargs)
2361 def _get_child_mock(self, **kwargs): argument
2362 return MagicMock(**kwargs)