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

Method testEXPN

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

Source from the content-addressed store, hash-verified

1107 smtp.quit()
1108
1109 def testEXPN(self):
1110 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost',
1111 timeout=support.LOOPBACK_TIMEOUT)
1112
1113 for listname, members in sim_lists.items():
1114 users = []
1115 for m in members:
1116 users.append('%s %s' % (sim_users[m], smtplib.quoteaddr(m)))
1117 expected_known = (250, bytes('\n'.join(users), "ascii"))
1118 self.assertEqual(smtp.expn(listname), expected_known)
1119
1120 u = 'PSU-Members-List'
1121 expected_unknown = (550, b'No access for you!')
1122 self.assertEqual(smtp.expn(u), expected_unknown)
1123 smtp.quit()
1124
1125 def testAUTH_PLAIN(self):
1126 self.serv.add_feature("AUTH PLAIN")

Callers

nothing calls this directly

Calls 6

expnMethod · 0.95
quitMethod · 0.95
itemsMethod · 0.45
appendMethod · 0.45
joinMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected