def test_iterconstants(self):
        """
        L{Flags.iterconstants} returns an iterator over all of the constants
        defined in the class, in the order they were defined.
        """
        constants = list(self.FXF.iterconstants())
        self.assertEqual(
            [self.FXF.READ, self.FXF.WRITE, self.FXF.APPEND,
             self.FXF.EXCLUSIVE, self.FXF.TEXT],
            constants)

        L{Flags.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