diff options
author | R David Murray <rdmurray@bitdance.com> | 2014-10-17 23:32:08 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2014-10-17 23:32:08 (GMT) |
commit | d2ff243b3829d17b0a6a9ac5eab0c522f517f466 (patch) | |
tree | 6653bfa4a6deff9651ed7da99742b14d2082e8a9 /Lib/test/test_email | |
parent | 77770bdaa80ad0b6e976f11135c7c865efe23ae8 (diff) | |
parent | 685b3495e1fd9853b1ca5960db3e3cb705920d4f (diff) | |
download | cpython-d2ff243b3829d17b0a6a9ac5eab0c522f517f466.zip cpython-d2ff243b3829d17b0a6a9ac5eab0c522f517f466.tar.gz cpython-d2ff243b3829d17b0a6a9ac5eab0c522f517f466.tar.bz2 |
Merge: #21991: make headerregistry params property MappingProxyType.
Diffstat (limited to 'Lib/test/test_email')
-rw-r--r-- | Lib/test/test_email/test_headerregistry.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_email/test_headerregistry.py b/Lib/test/test_email/test_headerregistry.py index 7d64a38..55ecdea 100644 --- a/Lib/test/test_email/test_headerregistry.py +++ b/Lib/test/test_email/test_headerregistry.py @@ -1,6 +1,7 @@ import datetime import textwrap import unittest +import types from email import errors from email import policy from email.message import Message @@ -235,6 +236,8 @@ class TestContentTypeHeader(TestHeaderBase): self.assertEqual(h.maintype, maintype) self.assertEqual(h.subtype, subtype) self.assertEqual(h.params, parmdict) + with self.assertRaises(TypeError): + h.params['abc'] = 'xyz' # params is read-only. self.assertDefectsEqual(h.defects, defects) self.assertEqual(h, decoded) self.assertEqual(h.fold(policy=policy.default), folded) |