Issue 1776581. Minor corrections to smtplib, and two small tests.

Thanks Alan McIntyre.
This commit is contained in:
Facundo Batista 2008-02-23 12:27:17 +00:00
parent fc2d01032f
commit 1660933d23
2 changed files with 5 additions and 4 deletions

View file

@ -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