summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_smtplib.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-06-11 16:27:40 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-06-11 16:27:40 (GMT)
commit1144da5821553449739744f08d041b4ba7114ecb (patch)
treeb8e583e0d2ff55c2ffea120caefc1d4f038f14b5 /Lib/test/test_smtplib.py
parent554bcbf1b925399ef06dd9fd6b87a20f5d028c1e (diff)
downloadcpython-1144da5821553449739744f08d041b4ba7114ecb.zip
cpython-1144da5821553449739744f08d041b4ba7114ecb.tar.gz
cpython-1144da5821553449739744f08d041b4ba7114ecb.tar.bz2
#19662: Eliminate warnings in other test modules that use smtpd.
Eventually these will want to convert to decode_data=False, I think.
Diffstat (limited to 'Lib/test/test_smtplib.py')
-rw-r--r--Lib/test/test_smtplib.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py
index 16e90f4..5bff25b 100644
--- a/Lib/test/test_smtplib.py
+++ b/Lib/test/test_smtplib.py
@@ -184,7 +184,8 @@ class DebuggingServerTests(unittest.TestCase):
self.old_DEBUGSTREAM = smtpd.DEBUGSTREAM
smtpd.DEBUGSTREAM = io.StringIO()
# Pick a random unused port by passing 0 for the port number
- self.serv = smtpd.DebuggingServer((HOST, 0), ('nowhere', -1))
+ self.serv = smtpd.DebuggingServer((HOST, 0), ('nowhere', -1),
+ decode_data=True)
# Keep a note of what port was assigned
self.port = self.serv.socket.getsockname()[1]
serv_args = (self.serv, self.serv_evt, self.client_evt)
@@ -719,7 +720,8 @@ class SimSMTPServer(smtpd.SMTPServer):
def handle_accepted(self, conn, addr):
self._SMTPchannel = self.channel_class(
- self._extra_features, self, conn, addr)
+ self._extra_features, self, conn, addr,
+ decode_data=self._decode_data)
def process_message(self, peer, mailfrom, rcpttos, data):
pass
@@ -742,7 +744,7 @@ class SMTPSimTests(unittest.TestCase):
self.serv_evt = threading.Event()
self.client_evt = threading.Event()
# Pick a random unused port by passing 0 for the port number
- self.serv = SimSMTPServer((HOST, 0), ('nowhere', -1))
+ self.serv = SimSMTPServer((HOST, 0), ('nowhere', -1), decode_data=True)
# Keep a note of what port was assigned
self.port = self.serv.socket.getsockname()[1]
serv_args = (self.serv, self.serv_evt, self.client_evt)