Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)
Add a patch to overwrite 'name' on 'obj' with 'value'.

The attribute C{name} on C{obj} will be assigned to C{value} when
C{patch} is called or during C{run_with_patches}.

You can restore the original values with a call to restore().

src/t/e/testtools-0.9.35/testtools/_spinner.py   testtools(Download)
        debug = MonkeyPatcher()
        if self._debug:
            debug.add_patch(defer.Deferred, 'debug', True)
            debug.add_patch(DelayedCall, 'debug', True)
        debug.patch()

src/t/e/testtools-HEAD/testtools/_spinner.py   testtools(Download)
        debug = MonkeyPatcher()
        if self._debug:
            debug.add_patch(defer.Deferred, 'debug', True)
            debug.add_patch(DelayedCall, 'debug', True)
        debug.patch()