def test_writesImplyFlush(self):
        """
        L{imap4.WriteBuffer} buffers writes until its buffer's size
        exceeds its maximum value.
        """
        buf = imap4.WriteBuffer(self.transport)
        firstData = b'x' * buf.bufferSize
        secondData = b'y'

        buf.write(firstData)

        self.assertFalse(self.transport.value())

        buf.write(secondData)

        self.assertEqual(self.transport.value(), firstData + secondData)

        L{imap4.WriteBuffer} buffers writes until its buffer's size
        exceeds its maximum value.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_imap.py