(self)
| 395 | self.assertEqual(self.output.getvalue(), mexpect) |
| 396 | |
| 397 | def testSendBinary(self): |
| 398 | m = b'A test message' |
| 399 | smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', |
| 400 | timeout=support.LOOPBACK_TIMEOUT) |
| 401 | self.addCleanup(smtp.close) |
| 402 | smtp.sendmail('John', 'Sally', m) |
| 403 | # XXX (see comment in testSend) |
| 404 | time.sleep(0.01) |
| 405 | smtp.quit() |
| 406 | |
| 407 | self.client_evt.set() |
| 408 | self.serv_evt.wait() |
| 409 | self.output.flush() |
| 410 | mexpect = '%s%s\n%s' % (MSG_BEGIN, m.decode('ascii'), MSG_END) |
| 411 | self.assertEqual(self.output.getvalue(), mexpect) |
| 412 | |
| 413 | def testSendNeedingDotQuote(self): |
| 414 | # Issue 12283 |
nothing calls this directly
no test coverage detected