unittest.mock.Mock._get_child_mock()

_get_child_mock(**kw)

Create the child mocks for attributes and return value. By default child mocks will be the same type as the parent. Subclasses of Mock may want to override this to customize the way child mocks are made.

For non-callable mocks the callable variant will be used (rather than any custom subclass).

doc_python
2016-10-07 17:46:11
Comments
Leave a Comment

Please login to continue.