def test_constants(self):
        """
        All constants besides C{RESPONSES} defined in L{_response} are
        integers and are keys in C{RESPONSES}.
        """
        for sym in dir(_responses):
            if sym == 'RESPONSES':
                continue
            if all((c == '_' or c in string.ascii_uppercase) for c in sym):
                val = getattr(_responses, sym)
                self.assertIsInstance(val, int)
                self.assertIn(val, _responses.RESPONSES)

        All constants besides C{RESPONSES} defined in L{_response} are
        integers and are keys in C{RESPONSES}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_web__responses.py