Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2515c4d commit 7abe61fCopy full SHA for 7abe61f
1 file changed
Lib/test/test_smtpd.py
@@ -52,6 +52,7 @@ def tearDown(self):
52
class SMTPDChannelTest(TestCase):
53
def setUp(self):
54
smtpd.socket = asyncore.socket = mock_socket
55
+ self.old_debugstream = smtpd.DEBUGSTREAM
56
self.debug = smtpd.DEBUGSTREAM = io.StringIO()
57
self.server = DummyServer('a', 'b')
58
conn, addr = self.server.accept()
@@ -60,6 +61,7 @@ def setUp(self):
60
61
def tearDown(self):
62
asyncore.close_all()
63
asyncore.socket = smtpd.socket = socket
64
+ smtpd.DEBUGSTREAM = self.old_debugstream
65
66
def write_line(self, line):
67
self.channel.socket.queue_recv(line)
0 commit comments