diff options
author | R David Murray <rdmurray@bitdance.com> | 2012-05-29 12:31:11 -0400 |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2012-05-29 12:31:11 -0400 |
commit | c87373fd88eb16822e51d59f715614bea5c7e752 (patch) | |
tree | f7b5707ab176e8357172922103f120a214ba0362 /Lib/test/test_email/test_message.py | |
parent | 91a7f2c947c0e56c4947aa3b88837eeaea556908 (diff) | |
download | cpython-c87373fd88eb16822e51d59f715614bea5c7e752.tar.gz |
#10839: add new test file that was omitted from checkin
Diffstat (limited to 'Lib/test/test_email/test_message.py')
-rw-r--r-- | Lib/test/test_email/test_message.py | 18 |
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 0000000000..8cc3f80e46 --- /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() |