def test_mixedAtoms(self):
        """
        A capability response consisting of both simple and category atoms of
        the same type should result in a list containing L{None} as well as the
        values for the category.
        """
        capabilitiesResult = self.protocol.getCapabilities(useCache=False)
        # Exercise codepath for both orderings of =-having and =-missing
        # capabilities.
        self.protocol.dataReceived(
            b'* CAPABILITY IMAP4rev1 FOO FOO=BAR BAR=FOO BAR\r\n')
        self.protocol.dataReceived(b'0001 OK Capability completed.\r\n')
        def gotCapabilities(capabilities):
            self.assertEqual(capabilities, {b'IMAP4rev1': None,
                                            b'FOO': [None, b'BAR'],
                                            b'BAR': [b'FOO', None]})
        capabilitiesResult.addCallback(gotCapabilities)
        return capabilitiesResult

        A capability response consisting of both simple and category atoms of
        the same type should result in a list containing L{None} as well as the
        values for the category.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py