@@ -179,31 +179,31 @@ def tearDown(self):
179
179
180
180
def testBasic (self ):
181
181
# connect
182
- smtp = smtplib .SMTP (HOST , self .port , local_hostname = 'localhost' , timeout = 3 )
182
+ smtp = smtplib .SMTP (HOST , self .port , local_hostname = 'localhost' , timeout = 15 )
183
183
smtp .quit ()
184
184
185
185
def testNOOP (self ):
186
- smtp = smtplib .SMTP (HOST , self .port , local_hostname = 'localhost' , timeout = 3 )
186
+ smtp = smtplib .SMTP (HOST , self .port , local_hostname = 'localhost' , timeout = 15 )
187
187
expected = (250 , 'Ok' )
188
188
self .assertEqual (smtp .noop (), expected )
189
189
smtp .quit ()
190
190
191
191
def testRSET (self ):
192
- smtp = smtplib .SMTP (HOST , self .port , local_hostname = 'localhost' , timeout = 3 )
192
+ smtp = smtplib .SMTP (HOST , self .port , local_hostname = 'localhost' , timeout = 15 )
193
193
expected = (250 , 'Ok' )
194
194
self .assertEqual (smtp .rset (), expected )
195
195
smtp .quit ()
196
196
197
197
def testNotImplemented (self ):
198
198
# EHLO isn't implemented in DebuggingServer
199
- smtp = smtplib .SMTP (HOST , self .port , local_hostname = 'localhost' , timeout = 3 )
199
+ smtp = smtplib .SMTP (HOST , self .port , local_hostname = 'localhost' , timeout = 15 )
200
200
expected = (502 , 'Error: command "EHLO" not implemented' )
201
201
self .assertEqual (smtp .ehlo (), expected )
202
202
smtp .quit ()
203
203
204
204
def testVRFY (self ):
205
205
# VRFY isn't implemented in DebuggingServer
206
- smtp = smtplib .SMTP (HOST , self .port , local_hostname = 'localhost' , timeout = 3 )
206
+ smtp = smtplib .SMTP (HOST , self .port , local_hostname = 'localhost' , timeout = 15 )
207
207
expected = (502 , 'Error: command "VRFY" not implemented' )
208
208
self .assertEqual (smtp .vrfy ('nobody@nowhere.com' ), expected )
209
209
self .assertEqual (smtp .verify ('nobody@nowhere.com' ), expected )
@@ -212,21 +212,21 @@ def testVRFY(self):
212
212
def testSecondHELO (self ):
213
213
# check that a second HELO returns a message that it's a duplicate
214
214
# (this behavior is specific to smtpd.SMTPChannel)
215
- smtp = smtplib .SMTP (HOST , self .port , local_hostname = 'localhost' , timeout = 3 )
215
+ smtp = smtplib .SMTP (HOST , self .port , local_hostname = 'localhost' , timeout = 15 )
216
216
smtp .helo ()
217
217
expected = (503 , 'Duplicate HELO/EHLO' )
218
218
self .assertEqual (smtp .helo (), expected )
219
219
smtp .quit ()
220
220
221
221
def testHELP (self ):
222
- smtp = smtplib .SMTP (HOST , self .port , local_hostname = 'localhost' , timeout = 3 )
222
+ smtp = smtplib .SMTP (HOST , self .port , local_hostname = 'localhost' , timeout = 15 )
223
223
self .assertEqual (smtp .help (), 'Error: command "HELP" not implemented' )
224
224
smtp .quit ()
225
225
226
226
def testSend (self ):
227
227
# connect and send mail
228
228
m = 'A test message'
229
- smtp = smtplib .SMTP (HOST , self .port , local_hostname = 'localhost' , timeout = 3 )
229
+ smtp = smtplib .SMTP (HOST , self .port , local_hostname = 'localhost' , timeout = 15 )
230
230
smtp .sendmail ('John' , 'Sally' , m )
231
231
# XXX(nnorwitz): this test is flaky and dies with a bad file descriptor
232
232
# in asyncore. This sleep might help, but should really be fixed
0 commit comments