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

Method testSecondHELO

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

Source from the content-addressed store, hash-verified

357 smtp.quit()
358
359 def testSecondHELO(self):
360 # check that a second HELO returns a message that it's a duplicate
361 # (this behavior is specific to smtpd.SMTPChannel)
362 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost',
363 timeout=support.LOOPBACK_TIMEOUT)
364 self.addCleanup(smtp.close)
365 smtp.helo()
366 expected = (503, b'Duplicate HELO/EHLO')
367 self.assertEqual(smtp.helo(), expected)
368 smtp.quit()
369
370 def testHELP(self):
371 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost',

Callers

nothing calls this directly

Calls 4

heloMethod · 0.95
quitMethod · 0.95
addCleanupMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected