|
|
ae2451 |
diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py
|
|
|
ae2451 |
index 14d0060d8ec..1bb66901880 100644
|
|
|
ae2451 |
--- a/Lib/test/test_smtplib.py
|
|
|
ae2451 |
+++ b/Lib/test/test_smtplib.py
|
|
|
ae2451 |
@@ -179,31 +179,31 @@ def tearDown(self):
|
|
|
ae2451 |
|
|
|
ae2451 |
def testBasic(self):
|
|
|
ae2451 |
# connect
|
|
|
ae2451 |
- smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=3)
|
|
|
ae2451 |
+ smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
|
|
|
ae2451 |
smtp.quit()
|
|
|
ae2451 |
|
|
|
ae2451 |
def testNOOP(self):
|
|
|
ae2451 |
- smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=3)
|
|
|
ae2451 |
+ smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
|
|
|
ae2451 |
expected = (250, 'Ok')
|
|
|
ae2451 |
self.assertEqual(smtp.noop(), expected)
|
|
|
ae2451 |
smtp.quit()
|
|
|
ae2451 |
|
|
|
ae2451 |
def testRSET(self):
|
|
|
ae2451 |
- smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=3)
|
|
|
ae2451 |
+ smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
|
|
|
ae2451 |
expected = (250, 'Ok')
|
|
|
ae2451 |
self.assertEqual(smtp.rset(), expected)
|
|
|
ae2451 |
smtp.quit()
|
|
|
ae2451 |
|
|
|
ae2451 |
def testNotImplemented(self):
|
|
|
ae2451 |
# EHLO isn't implemented in DebuggingServer
|
|
|
ae2451 |
- smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=3)
|
|
|
ae2451 |
+ smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
|
|
|
ae2451 |
expected = (502, 'Error: command "EHLO" not implemented')
|
|
|
ae2451 |
self.assertEqual(smtp.ehlo(), expected)
|
|
|
ae2451 |
smtp.quit()
|
|
|
ae2451 |
|
|
|
ae2451 |
def testVRFY(self):
|
|
|
ae2451 |
# VRFY isn't implemented in DebuggingServer
|
|
|
ae2451 |
- smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=3)
|
|
|
ae2451 |
+ smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
|
|
|
ae2451 |
expected = (502, 'Error: command "VRFY" not implemented')
|
|
|
ae2451 |
self.assertEqual(smtp.vrfy('nobody@nowhere.com'), expected)
|
|
|
ae2451 |
self.assertEqual(smtp.verify('nobody@nowhere.com'), expected)
|
|
|
ae2451 |
@@ -212,21 +212,21 @@ def testVRFY(self):
|
|
|
ae2451 |
def testSecondHELO(self):
|
|
|
ae2451 |
# check that a second HELO returns a message that it's a duplicate
|
|
|
ae2451 |
# (this behavior is specific to smtpd.SMTPChannel)
|
|
|
ae2451 |
- smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=3)
|
|
|
ae2451 |
+ smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
|
|
|
ae2451 |
smtp.helo()
|
|
|
ae2451 |
expected = (503, 'Duplicate HELO/EHLO')
|
|
|
ae2451 |
self.assertEqual(smtp.helo(), expected)
|
|
|
ae2451 |
smtp.quit()
|
|
|
ae2451 |
|
|
|
ae2451 |
def testHELP(self):
|
|
|
ae2451 |
- smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=3)
|
|
|
ae2451 |
+ smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
|
|
|
ae2451 |
self.assertEqual(smtp.help(), 'Error: command "HELP" not implemented')
|
|
|
ae2451 |
smtp.quit()
|
|
|
ae2451 |
|
|
|
ae2451 |
def testSend(self):
|
|
|
ae2451 |
# connect and send mail
|
|
|
ae2451 |
m = 'A test message'
|
|
|
ae2451 |
- smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=3)
|
|
|
ae2451 |
+ smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
|
|
|
ae2451 |
smtp.sendmail('John', 'Sally', m)
|
|
|
ae2451 |
# XXX(nnorwitz): this test is flaky and dies with a bad file descriptor
|
|
|
ae2451 |
# in asyncore. This sleep might help, but should really be fixed
|