From: R David Murray Date: Tue, 29 May 2012 16:31:11 +0000 (-0400) Subject: #10839: add new test file that was omitted from checkin X-Git-Tag: v3.3.0a4~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=026ba312d4750d9d32fc54eb48eb0c34908b51ce;p=thirdparty%2FPython%2Fcpython.git #10839: add new test file that was omitted from checkin --- diff --git a/Lib/test/test_email/test_message.py b/Lib/test/test_email/test_message.py new file mode 100644 index 000000000000..8cc3f80e460e --- /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()