def test_patchNonExisting(self):
        """
        Patching a non-existing attribute fails with an C{AttributeError}.
        """
        self.monkeyPatcher.addPatch(self.testObject, 'nowhere',
                                    'blow up please')
        self.assertRaises(AttributeError, self.monkeyPatcher.patch)

        Patching a non-existing attribute fails with an C{AttributeError}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_monkey.py