def METHOD_NAME(self):
    """
    L{MonkeyPatcher} is a context manager that applies its patches on
    entry and restore original values on exit.
    """
    self.monkeyPatcher.addPatch(self.testObject, "foo", "patched value")
    with self.monkeyPatcher:
        self.assertEqual(self.testObject.foo, "patched value")
    self.assertEqual(self.testObject.foo, self.originalObject.foo)