mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Issue 1776581. Minor corrections to smtplib, and two small tests.
Thanks Alan McIntyre.
This commit is contained in:
parent
fc2d01032f
commit
1660933d23
2 changed files with 5 additions and 4 deletions
|
@ -82,8 +82,9 @@ class GeneralTests(TestCase):
|
|||
# to reference the nonexistent 'sock' attribute of the SMTP object
|
||||
# causes an AttributeError)
|
||||
smtp = smtplib.SMTP()
|
||||
self.assertRaises(AttributeError, smtp.ehlo)
|
||||
self.assertRaises(AttributeError, smtp.send, 'test msg')
|
||||
self.assertRaises(smtplib.SMTPServerDisconnected, smtp.ehlo)
|
||||
self.assertRaises(smtplib.SMTPServerDisconnected,
|
||||
smtp.send, 'test msg')
|
||||
|
||||
def testLocalHostName(self):
|
||||
# check that supplied local_hostname is used
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue