• Home
  • Raw
  • Download

Lines Matching +full:localhost +full:- +full:test

12 from test import test_support
36 n -= 1
43 @unittest.skipUnless(threading, 'Threading required for this test.')
105 # Test server thread using the specified SMTP server class
125 n -= 1
137 MSG_BEGIN = '---------- MESSAGE FOLLOWS ----------\n'
138 MSG_END = '------------ END MESSAGE ------------\n'
140 # NOTE: Some SMTP objects in the tests below are created with a non-default
143 # test server times out, causing the test to fail.
145 # Test behavior of smtpd.DebuggingServer
146 @unittest.skipUnless(threading, 'Threading required for this test.')
159 self.serv = smtpd.DebuggingServer((HOST, 0), ('nowhere', -1))
182 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
186 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
192 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
199 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
206 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
215 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
222 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
228 m = 'A test message'
229 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
231 # XXX(nnorwitz): this test is flaky and dies with a bad file descriptor
247 # Test various operations on an unconnected SMTP object that
254 smtp.send, 'test msg')
257 # check that non-numeric port raises socket.error
259 "localhost", "bogus")
261 "localhost:bogus")
264 # test response of client to a non-successful HELO message
265 @unittest.skipUnless(threading, 'Threading required for this test.')
292 HOST, self.port, 'localhost', 3)
295 @unittest.skipUnless(threading, 'Threading required for this test.')
321 HOST, self.port, 'localhost', 3)
335 'cram-md5': ('TXIUQUBZB21LD2HLCMUUY29TIDG4OWQ0MJ'
340 sim_lists = {'list-1':['Mr.A@somewhere.com','Mrs.C@somewhereesle.com'],
341 'list-2':['Ms.B@somewhere.com',],
349 [ "250-{0}\r\n".format(x) for x in extra_features ])
353 resp = ('250-testhost\r\n'
354 '250-EXPN\r\n'
355 '250-SIZE 20000000\r\n'
356 '250-STARTTLS\r\n'
357 '250-DELIVERBY\r\n')
374 if n < len(user_list) - 1:
375 self.push('250-%s %s' % (sim_users[user_email], quoted_addr))
382 if arg.strip().lower()=='cram-md5':
422 # Test various SMTP & ESMTP commands/behaviors that require a simulated server
424 @unittest.skipUnless(threading, 'Threading required for this test.')
432 self.serv = SimSMTPServer((HOST, 0), ('nowhere', -1))
452 # smoke test
453 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
457 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
462 # features expected from the test server
474 self.assertFalse(smtp.has_extn('unsupported-feature'))
478 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
490 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
499 u = 'PSU-Members-List'
506 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
511 # SimSMTPChannel doesn't fully support LOGIN or CRAM-MD5 auth because they
521 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
528 self.serv.add_feature("AUTH CRAM-MD5")
529 smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
533 if sim_auth_credentials['cram-md5'] not in str(err):
537 #test infrastructure can support it.
541 local_hostname='localhost',