MCPcopy Create free account
hub / github.com/python/cpython / test_lowercase_mail_from_rcpt_to

Method test_lowercase_mail_from_rcpt_to

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

Source from the content-addressed store, hash-verified

1388 self.assertEqual(self.serv._addresses['tos'], ['rene@example.com'])
1389
1390 def test_lowercase_mail_from_rcpt_to(self):
1391 m = 'A test message'
1392 smtp = smtplib.SMTP(
1393 HOST, self.port, local_hostname='localhost',
1394 timeout=support.LOOPBACK_TIMEOUT)
1395 self.addCleanup(smtp.close)
1396
1397 smtp.sendmail('John', 'Sally', m)
1398
1399 self.assertIn(['mail from:<John> size=14'], self.serv._SMTPchannel.all_received_lines)
1400 self.assertIn(['rcpt to:<Sally>'], self.serv._SMTPchannel.all_received_lines)
1401
1402
1403class SimSMTPUTF8Server(SimSMTPServer):

Callers

nothing calls this directly

Calls 3

sendmailMethod · 0.95
addCleanupMethod · 0.80
assertInMethod · 0.80

Tested by

no test coverage detected