summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-05-29 16:31:11 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-05-29 16:31:11 (GMT)
commit026ba312d4750d9d32fc54eb48eb0c34908b51ce (patch)
treeb38a398d453a0afbe4ea3b574b9917eee27272d6 /Lib
parentabfc37491cecb0a052d54c3bf0525ac140e94f7e (diff)
downloadcpython-026ba312d4750d9d32fc54eb48eb0c34908b51ce.zip
cpython-026ba312d4750d9d32fc54eb48eb0c34908b51ce.tar.gz
cpython-026ba312d4750d9d32fc54eb48eb0c34908b51ce.tar.bz2
#10839: add new test file that was omitted from checkin
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_email/test_message.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/Lib/test/test_email/test_message.py b/Lib/test/test_email/test_message.py
new file mode 100644
index 0000000..8cc3f80
--- /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()