Lines Matching refs:new_callable
201 the *new_callable* argument to :func:`patch`.
800 >>> with patch('__main__.Foo.foo', new_callable=PropertyMock) as mock_foo:
1058 …t, new=DEFAULT, spec=None, create=False, spec_set=None, autospec=None, new_callable=None, **kwargs)
1083 *new_callable* allows you to specify a different class, or callable object,
1127 the :class:`Mock` (or *new_callable*) on construction.
1174 The *new_callable* argument is useful where you want to use an alternative
1179 >>> with patch('__main__.thing', new_callable=NonCallableMock) as mock_thing:
1193 >>> @patch('sys.stdout', new_callable=StringIO)
1253 …e, new=DEFAULT, spec=None, create=False, spec_set=None, autospec=None, new_callable=None, **kwargs)
1260 *new_callable* have the same meaning as for :func:`patch`. Like :func:`patch`,
1372 …ultiple(target, spec=None, create=False, spec_set=None, autospec=None, new_callable=None, **kwargs)
1388 *new_callable* have the same meaning as for :func:`patch`. These arguments will