MCPcopy Index your code
hub / github.com/python/cpython / testSendNeedingDotQuote

Method testSendNeedingDotQuote

Lib/test/test_smtplib.py:413–428  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

411 self.assertEqual(self.output.getvalue(), mexpect)
412
413 def testSendNeedingDotQuote(self):
414 # Issue 12283
415 m = '.A test\n.mes.sage.'
416 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost',
417 timeout=support.LOOPBACK_TIMEOUT)
418 self.addCleanup(smtp.close)
419 smtp.sendmail('John', 'Sally', m)
420 # XXX (see comment in testSend)
421 time.sleep(0.01)
422 smtp.quit()
423
424 self.client_evt.set()
425 self.serv_evt.wait()
426 self.output.flush()
427 mexpect = '%s%s\n%s' % (MSG_BEGIN, m, MSG_END)
428 self.assertEqual(self.output.getvalue(), mexpect)
429
430 def test_issue43124_escape_localhostname(self):
431 # see: https://bugs.python.org/issue43124

Callers

nothing calls this directly

Calls 9

sendmailMethod · 0.95
quitMethod · 0.95
addCleanupMethod · 0.80
sleepMethod · 0.45
setMethod · 0.45
waitMethod · 0.45
flushMethod · 0.45
assertEqualMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected