Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Unified Diff: Lib/test/test_email/test_message.py

Issue 10839: email module should not allow some header field repetitions
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/email/policy.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
new file mode 100644
--- /dev/null
+++ b/Lib/test/test_email/test_message.py
@@ -0,0 +1,18 @@
+import unittest
+from email import policy
+from test.test_email import TestEmailBase
+
+
+class Test(TestEmailBase):
+
+ policy = policy.default
+
+ def test_error_on_setitem_if_max_count_exceeded(self):
+ m = self._str_msg("")
+ m['To'] = 'abc@xyz'
+ with self.assertRaises(ValueError):
+ m['To'] = 'xyz@abc'
+
+
+if __name__ == '__main__':
+ unittest.main()
« no previous file with comments | « Lib/email/policy.py ('k') | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+