More tests of the concrete policy methods would probably be
a good idea, but this is a start, and it brings line coverage
up to 100% for the policy module.
Patch by Milan Oberkirch.
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()
James Oakley
Elena Oat
Jon Oberheide
+Milan Oberkirch
Pascal Oberndoerfer
Jeffrey Ollie
Adam Olsen