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