summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-05-26 18:33:59 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-05-26 18:33:59 (GMT)
commitd1a30c939cc6378423dd3cc22382a9abe2a7d882 (patch)
treed083d5bab633c09a9e9857987f8d2b960a00c396 /Lib/test/test_logging.py
parent032eed3c4a42ca29de2c07fba2e0555eaff1700c (diff)
downloadcpython-d1a30c939cc6378423dd3cc22382a9abe2a7d882.zip
cpython-d1a30c939cc6378423dd3cc22382a9abe2a7d882.tar.gz
cpython-d1a30c939cc6378423dd3cc22382a9abe2a7d882.tar.bz2
#8739: upgrade smtpd to RFC 5321 and 1870.
smtpd now handles EHLO and has infrastructure for extended smtp command mode. The SIZE extension is also implemented. In order to support parameters on MAIL FROM, the RFC 5322 parser from the email package is used to parse the address "token". Logging subclasses things and overrides __init__, so it was necessary to update those __init__ functions in the logging tests to make the logging tests pass. The original suggestion and patch were by Alberto Trevino. Juhana Jauhiainen added the --size argument and SIZE parameter support. Michele OrrĂ¹ improved the patch and added more tests. Dan Boswell conditionalized various bits of code on whether or not we are in HELO or EHLO mode, as well as some other improvements and tests. I finalized the patch and added the address parsing.
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r--Lib/test/test_logging.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 3adeaec..26baf11 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -663,6 +663,7 @@ if threading:
self.smtp_server = server
self.conn = conn
self.addr = addr
+ self.data_size_limit = None
self.received_lines = []
self.smtp_state = self.COMMAND
self.seen_greeting = ''
@@ -682,6 +683,7 @@ if threading:
return
self.push('220 %s %s' % (self.fqdn, smtpd.__version__))
self.set_terminator(b'\r\n')
+ self.extended_smtp = False
class TestSMTPServer(smtpd.SMTPServer):
@@ -709,6 +711,7 @@ if threading:
def __init__(self, addr, handler, poll_interval, sockmap):
self._localaddr = addr
self._remoteaddr = None
+ self.data_size_limit = None
self.sockmap = sockmap
asyncore.dispatcher.__init__(self, map=sockmap)
try: