summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_email
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2014-08-04 14:16:49 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2014-08-04 14:16:49 (GMT)
commitd577480197f7cc427ac75deaebae3106399a9cd3 (patch)
tree32c98a99131958f874d3c1836c9ef757fa4ac1e4 /Lib/test/test_email
parent591176e544dfeec4586e239d5d07c6420a650f2c (diff)
downloadcpython-d577480197f7cc427ac75deaebae3106399a9cd3.zip
cpython-d577480197f7cc427ac75deaebae3106399a9cd3.tar.gz
cpython-d577480197f7cc427ac75deaebae3106399a9cd3.tar.bz2
#20977: fix undefined name in the email module. Patch by Rose Ames.
Diffstat (limited to 'Lib/test/test_email')
-rw-r--r--Lib/test/test_email/test__header_value_parser.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/test_email/test__header_value_parser.py b/Lib/test/test_email/test__header_value_parser.py
index 32996ca..5404d19 100644
--- a/Lib/test/test_email/test__header_value_parser.py
+++ b/Lib/test/test_email/test__header_value_parser.py
@@ -2443,6 +2443,18 @@ class TestParser(TestParserMixin, TestEmailBase):
self.assertEqual(str(address_list.addresses[1]),
str(address_list.mailboxes[2]))
+ def test_invalid_content_disposition(self):
+ content_disp = self._test_parse_x(
+ parser.parse_content_disposition_header,
+ ";attachment", "; attachment", ";attachment",
+ [errors.InvalidHeaderDefect]*2
+ )
+
+ def test_invalid_content_transfer_encoding(self):
+ cte = self._test_parse_x(
+ parser.parse_content_transfer_encoding_header,
+ ";foo", ";foo", ";foo", [errors.InvalidHeaderDefect]*3
+ )
@parameterize
class Test_parse_mime_version(TestParserMixin, TestEmailBase):