class unittest.mock.MagicMock(*args, **kw)
MagicMock
is a subclass of Mock
with default implementations of most of the magic methods. You can use MagicMock
without having to configure the magic methods yourself.
The constructor parameters have the same meaning as for Mock
.
If you use the spec or spec_set arguments then only magic methods that exist in the spec will be created.
Please login to continue.