From cc9ca223d62fdcf09f22d3cc8eb924cadba6d693 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Wed, 18 May 2011 18:04:04 +0200 Subject: [PATCH] Also protect ehlo() and quit() with the transient_internet() context manager --- Lib/test/test_smtpnet.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Lib/test/test_smtpnet.py b/Lib/test/test_smtpnet.py index ca31c1efb0a..61ecd74f86a 100644 --- a/Lib/test/test_smtpnet.py +++ b/Lib/test/test_smtpnet.py @@ -18,8 +18,8 @@ class SmtpTest(unittest.TestCase): with support.transient_internet(self.testServer): server = smtplib.SMTP(self.testServer, self.remotePort) server.starttls(context=self.context) - server.ehlo() - server.quit() + server.ehlo() + server.quit() class SmtpSSLTest(unittest.TestCase): @@ -31,22 +31,22 @@ class SmtpSSLTest(unittest.TestCase): support.get_attribute(smtplib, 'SMTP_SSL') with support.transient_internet(self.testServer): server = smtplib.SMTP_SSL(self.testServer, self.remotePort) - server.ehlo() - server.quit() + server.ehlo() + server.quit() def test_connect_default_port(self): support.get_attribute(smtplib, 'SMTP_SSL') with support.transient_internet(self.testServer): server = smtplib.SMTP_SSL(self.testServer) - server.ehlo() - server.quit() + server.ehlo() + server.quit() def test_connect_using_sslcontext(self): support.get_attribute(smtplib, 'SMTP_SSL') with support.transient_internet(self.testServer): server = smtplib.SMTP_SSL(self.testServer, self.remotePort, context=self.context) - server.ehlo() - server.quit() + server.ehlo() + server.quit() def test_main():