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

Method testEHLO

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

Source from the content-addressed store, hash-verified

1070 smtp.quit()
1071
1072 def testEHLO(self):
1073 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost',
1074 timeout=support.LOOPBACK_TIMEOUT)
1075
1076 # no features should be present before the EHLO
1077 self.assertEqual(smtp.esmtp_features, {})
1078
1079 # features expected from the test server
1080 expected_features = {'expn':'',
1081 'size': '20000000',
1082 'starttls': '',
1083 'deliverby': '',
1084 'help': '',
1085 }
1086
1087 smtp.ehlo()
1088 self.assertEqual(smtp.esmtp_features, expected_features)
1089 for k in expected_features:
1090 self.assertTrue(smtp.has_extn(k))
1091 self.assertFalse(smtp.has_extn('unsupported-feature'))
1092 smtp.quit()
1093
1094 def testVRFY(self):
1095 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost',

Callers

nothing calls this directly

Calls 6

ehloMethod · 0.95
has_extnMethod · 0.95
quitMethod · 0.95
assertTrueMethod · 0.80
assertFalseMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected