def test_permanentflags(self):
        """
        If the server response to a I{SELECT} or I{EXAMINE} command includes an
        I{FLAGS} response, the L{Deferred} returned by L{IMAP4Client.select} or
        L{IMAP4Client.examine} fires with a C{dict} including the value
        associated with the C{'FLAGS'} key.
        """
        d = self._examineOrSelect()
        self._response(
            b'* OK [PERMANENTFLAGS (\\Starred)] Just one permanent flag in '
            b'that list up there')
        self.assertEqual(
            self.successResultOf(d), {
                'READ-WRITE': False,
                'PERMANENTFLAGS': ('\\Starred',)})

        If the server response to a I{SELECT} or I{EXAMINE} command includes an
        I{FLAGS} response, the L{Deferred} returned by L{IMAP4Client.select} or
        L{IMAP4Client.examine} fires with a C{dict} including the value
        associated with the C{'FLAGS'} key.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py