def testSendMessage(self):
        m = email.mime.text.MIMEText('A test message')
        smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=3)
        smtp.send_message(m, from_addr='John', to_addrs='Sally')
        # XXX (see comment in testSend)
        time.sleep(0.01)
        smtp.quit()

        self.client_evt.set()
        self.serv_evt.wait()
        self.output.flush()
        # Add the X-Peer header that DebuggingServer adds
        m['X-Peer'] = socket.gethostbyname('localhost')
        mexpect = (MSG_BEGIN, m.as_string(), MSG_END) % '%s%s\n%s'
        self.assertEqual(self.output.getvalue(), mexpect)
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_smtplib.py/DebuggingServerTests.testSendMessage/swapped operands of `%`