summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_email/test_policy.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_email/test_policy.py b/Lib/test/test_email/test_policy.py
index 06ad5f2..e797f36 100644
--- a/Lib/test/test_email/test_policy.py
+++ b/Lib/test/test_email/test_policy.py
@@ -319,5 +319,14 @@ class TestPolicyPropagation(unittest.TestCase):
self.assertEqual(msg.as_string(), "Subject: testXTo: fooXX")
+class TestConcretePolicies(unittest.TestCase):
+
+ def test_header_store_parse_rejects_newlines(self):
+ instance = email.policy.EmailPolicy()
+ self.assertRaises(ValueError,
+ instance.header_store_parse,
+ 'From', 'spam\negg@foo.py')
+
+
if __name__ == '__main__':
unittest.main()