Lines Matching refs:MagicMock
9 'MagicMock',
1033 if issubclass(_type, MagicMock) and _new_name in _async_method_magics:
1039 # Any synchronous method on AsyncMock becomes a MagicMock
1040 klass = MagicMock
1045 klass = MagicMock
1469 Klass = MagicMock
1707 `MagicMock` otherwise. If `patch` is used as a decorator and `new` is
1718 The `spec` and `spec_set` keyword arguments are passed to the `MagicMock`
1726 used for async functions and `MagicMock` for the rest.
1764 `AsyncMock` if the patched object is asynchronous, to `MagicMock`
2135 """A version of `MagicMock` that isn't callable."""
2152 class MagicMock(MagicMixin, Mock):
2154 MagicMock is a subclass of Mock with default implementations
2155 of most of the magic methods. You can use MagicMock without having to
2161 Attributes and the return value of a `MagicMock` will also be `MagicMocks`.
2698 Klass = MagicMock
2741 # MagicMock already does the useful magic methods for us
2775 child_klass = MagicMock
2857 default) then a `MagicMock` will be created for you, with the API limited
2903 mock = MagicMock(name='open', spec=open_spec)
2905 handle = MagicMock(spec=file_spec)
2943 return MagicMock(**kwargs)