Protect test_smtpnet against connection failures
This commit is contained in:
parent
d4958c2832
commit
6003ff7633
|
@ -12,7 +12,8 @@ class SmtpSSLTest(unittest.TestCase):
|
||||||
|
|
||||||
def test_connect(self):
|
def test_connect(self):
|
||||||
support.get_attribute(smtplib, 'SMTP_SSL')
|
support.get_attribute(smtplib, 'SMTP_SSL')
|
||||||
server = smtplib.SMTP_SSL(self.testServer, self.remotePort)
|
with support.transient_internet(self.testServer):
|
||||||
|
server = smtplib.SMTP_SSL(self.testServer, self.remotePort)
|
||||||
server.ehlo()
|
server.ehlo()
|
||||||
server.quit()
|
server.quit()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue