def test_raiseOnBadAttributeAccess(self):
        """
        Accessing bogus attributes raises C{AttributeError}, *even*
        when that attribute actually is in the sentence data.
        """
        sentence = self.sentenceClass({"BOGUS": None})
        self.assertRaises(AttributeError, getattr, sentence, "BOGUS")

        Accessing bogus attributes raises C{AttributeError}, *even*
        when that attribute actually is in the sentence data.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/positioning/test/test_sentence.py