From 380ef012998e5951333e68f6130aba8aba9ee721 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Mon, 6 Jun 2016 02:03:11 +0000 Subject: [PATCH] =?UTF-8?q?Issue=20#27110:=20Add=20smtpd.SMTPChannel=20to?= =?UTF-8?q?=20=5F=5Fall=5F=5F,=20by=20Jacek=20Ko=C5=82odziej?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Lib/smtpd.py | 5 ++++- Lib/test/test_smtpd.py | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Lib/smtpd.py b/Lib/smtpd.py index 5f3b05eff86..8103ca9af0d 100755 --- a/Lib/smtpd.py +++ b/Lib/smtpd.py @@ -89,7 +89,10 @@ import collections from warnings import warn from email._header_value_parser import get_addr_spec, get_angle_addr -__all__ = ["SMTPServer","DebuggingServer","PureProxy","MailmanProxy"] +__all__ = [ + "SMTPChannel", "SMTPServer", "DebuggingServer", "PureProxy", + "MailmanProxy", +] program = sys.argv[0] __version__ = 'Python SMTP proxy version 0.3' diff --git a/Lib/test/test_smtpd.py b/Lib/test/test_smtpd.py index d92c9b3b020..3eebe948ad8 100644 --- a/Lib/test/test_smtpd.py +++ b/Lib/test/test_smtpd.py @@ -998,5 +998,16 @@ class SMTPDChannelTestWithEnableSMTPUTF8True(unittest.TestCase): self.write_line(b'test\r\n.') self.assertEqual(self.channel.socket.last[0:3], b'250') + +class MiscTestCase(unittest.TestCase): + def test__all__(self): + blacklist = { + "program", "Devnull", "DEBUGSTREAM", "NEWLINE", "COMMASPACE", + "DATA_SIZE_DEFAULT", "usage", "Options", "parseargs", + + } + support.check__all__(self, smtpd, blacklist=blacklist) + + if __name__ == "__main__": unittest.main()