def test_iterconstants(self):
        """
        L{Names.iterconstants} returns an iterator over all of the constants
        defined in the class, in the order they were defined.
        """
        constants = list(self.METHOD.iterconstants())
        self.assertEqual(
            [self.METHOD.GET, self.METHOD.PUT,
             self.METHOD.POST, self.METHOD.DELETE],
            constants)

        L{Names.iterconstants} returns an iterator over all of the constants
        defined in the class, in the order they were defined.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/test/test_constants.py