def test_flagsIfSet(self):
        """
        L{dns._compactRepr} displays flags if they have a non-default value.
        """
        m = self.messageFactory(flagTrue=True, flagFalse=True)
        self.assertEqual(
            '<Foo '
            "alwaysShowField='AS' "
            'flags=flagTrue,flagFalse'
            '>',
            repr(m),
        )

        L{dns._compactRepr} displays flags if they have a non-default value.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/names/test/test_dns.py