Lines Matching defs:Mock
17 'Mock',
129 # can't use isinstance on Mock objects because they override __class__
466 """A non-callable version of `Mock`"""
658 raise AttributeError("Mock object has no attribute %r" % name)
761 raise AttributeError("Mock object has no attribute '%s'" % name)
767 raise AttributeError("Mock object has no attribute '%s'" % name)
898 Subclasses of Mock may want to override this to customize the way
908 klass = Mock
1031 class Mock(CallableMixin, NonCallableMock):
1033 Create a new `Mock` object. `Mock` takes several optional arguments
1034 that specify the behaviour of the Mock object:
1050 * `side_effect`: A function to be called whenever the Mock is called. See
1064 this is a new Mock (created on first access). See the
1068 calling the Mock will pass the call through to the wrapped object
1070 Mock object that wraps the corresponding attribute of the wrapped object
1352 # XXXX If new is a Mock we could call new.configure_mock(**kwargs)
1559 the `Mock` (or `new_callable`) on construction.
1592 with patch.dict('sys.modules', mymodule=Mock(), other_module=Mock()):
1890 class MagicMock(MagicMixin, Mock):
1892 MagicMock is a subclass of Mock with default implementations
2352 class PropertyMock(Mock):