twisted.trial.test.test_tests.MonkeyPatchMixin(object)
class documentationtwisted.trial.test.test_tests
(View In Hierarchy)
Known subclasses: twisted.trial.test.test_tests.AsynchronousMonkeyPatchTests, twisted.trial.test.test_tests.SynchronousMonkeyPatchTests
Tests for the patch() helper method in unittest.TestCase
.
Method | setUp | Setup our test case |
Method | test_patch | Calling patch() on a test monkey patches the specified
object and attribute. |
Method | test_patchRestoredAfterRun | Any monkey patches introduced by a test using patch() are
reverted after the test has run. |
Method | test_revertDuringTest | patch() return a monkey.MonkeyPatcher
object that can be used to restore the original values before the end of
the test. |
Method | test_revertAndRepatch | The returned monkey.MonkeyPatcher
object can re-apply the patch during the test run. |
Method | test_successivePatches | Successive patches are applied and reverted just like a single patch. |
Any monkey patches introduced by a test using patch()
are
reverted after the test has run.
patch()
return a monkey.MonkeyPatcher
object that can be used to restore the original values before the end of
the test.
The returned monkey.MonkeyPatcher
object can re-apply the patch during the test run.