def test_patchExisting(self):
        """
        Patching an attribute that exists sets it to the value defined in the
        patch.
        """
        self.monkeyPatcher.addPatch(self.testObject, 'foo', 'haha')
        self.monkeyPatcher.patch()
        self.assertEqual(self.testObject.foo, 'haha')

        Patching an attribute that exists sets it to the value defined in the
        patch.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_monkey.py