summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2015-10-09 14:19:33 (GMT)
committerR David Murray <rdmurray@bitdance.com>2015-10-09 14:19:33 (GMT)
commit1a815389cccef2e28e2d27f14e71a1b708cfb20f (patch)
tree96b2c80b81916c20b03bd91988b6dac4e0b63294 /Lib/test
parent5ae56919ab46e07e9bd6e5530cddac75e0276505 (diff)
downloadcpython-1a815389cccef2e28e2d27f14e71a1b708cfb20f.zip
cpython-1a815389cccef2e28e2d27f14e71a1b708cfb20f.tar.gz
cpython-1a815389cccef2e28e2d27f14e71a1b708cfb20f.tar.bz2
#25328: add missing raise keyword in decode_data+SMTPUTF8 check.
This is a relatively benign bug, since having both be true was correctly rejected at in SMTPServer even before this patch. Patch by Xiang Zhang.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_smtpd.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_smtpd.py b/Lib/test/test_smtpd.py
index 1aa55d2..88dbfdf 100644
--- a/Lib/test/test_smtpd.py
+++ b/Lib/test/test_smtpd.py
@@ -313,6 +313,12 @@ class SMTPDChannelTest(unittest.TestCase):
DummyDispatcherBroken, BrokenDummyServer,
(support.HOST, 0), ('b', 0), decode_data=True)
+ def test_decode_data_and_enable_SMTPUTF8_raises(self):
+ self.assertRaises(
+ ValueError, smtpd.SMTPChannel,
+ self.server, self.channel.conn, self.channel.addr,
+ enable_SMTPUTF8=True, decode_data=True)
+
def test_server_accept(self):
self.server.handle_accept()