@@ -184,7 +184,8 @@ def setUp(self):
184184 self .old_DEBUGSTREAM = smtpd .DEBUGSTREAM
185185 smtpd .DEBUGSTREAM = io .StringIO ()
186186 # Pick a random unused port by passing 0 for the port number
187- self .serv = smtpd .DebuggingServer ((HOST , 0 ), ('nowhere' , - 1 ))
187+ self .serv = smtpd .DebuggingServer ((HOST , 0 ), ('nowhere' , - 1 ),
188+ decode_data = True )
188189 # Keep a note of what port was assigned
189190 self .port = self .serv .socket .getsockname ()[1 ]
190191 serv_args = (self .serv , self .serv_evt , self .client_evt )
@@ -719,7 +720,8 @@ def __init__(self, *args, **kw):
719720
720721 def handle_accepted (self , conn , addr ):
721722 self ._SMTPchannel = self .channel_class (
722- self ._extra_features , self , conn , addr )
723+ self ._extra_features , self , conn , addr ,
724+ decode_data = self ._decode_data )
723725
724726 def process_message (self , peer , mailfrom , rcpttos , data ):
725727 pass
@@ -742,7 +744,7 @@ def setUp(self):
742744 self .serv_evt = threading .Event ()
743745 self .client_evt = threading .Event ()
744746 # Pick a random unused port by passing 0 for the port number
745- self .serv = SimSMTPServer ((HOST , 0 ), ('nowhere' , - 1 ))
747+ self .serv = SimSMTPServer ((HOST , 0 ), ('nowhere' , - 1 ), decode_data = True )
746748 # Keep a note of what port was assigned
747749 self .port = self .serv .socket .getsockname ()[1 ]
748750 serv_args = (self .serv , self .serv_evt , self .client_evt )
0 commit comments