def _flagsSilentlyTest(self, method, item):
        """
        Test a silent flag modifying method.  Call the method, assert that the
        correct bytes are sent, deliver an I{OK} response, and assert that the
        result of the Deferred returned by the method is correct.

        @param method: The name of the method to test.
        @param item: The data item which is expected to be specified.
        """
        d = getattr(self.client, method)('3', ('\\Read', '\\Seen'), True)
        self.assertEqual(
            self.transport.value(),
            b'0001 STORE 3 ' + item + b' (\\Read \\Seen)\r\n')
        self.client.lineReceived(b'0001 OK STORE completed')
        self.assertEqual(self.successResultOf(d), {})

        Test a silent flag modifying method.  Call the method, assert that the
        correct bytes are sent, deliver an I{OK} response, and assert that the
        result of the Deferred returned by the method is correct.

        @param method: The name of the method to test.
        @param item: The data item which is expected to be specified.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py