diff -r 78658affc20d Lib/test/test_email/test_email.py --- a/Lib/test/test_email/test_email.py Tue Mar 13 19:50:32 2012 +0000 +++ b/Lib/test/test_email/test_email.py Tue Mar 13 21:55:06 2012 +0000 @@ -48,9 +48,26 @@ EMPTYSTRING = '' SPACE = ' ' +class SubMessage(Message): + """Used in tests that verify that the Message API is + fully accessible and functioning properly when called + from a subclass. + + """ + def get(self, key, failobj): + super().get(key, failobj) + # Test various aspects of the Message class's API class TestMessageAPI(TestEmailBase): + + def test_get_via_subclass(self): + #test that get doesn't throw an AttributeError + #when called from a subclass. + m = SubMessage() + ct = m.get('content-type', None) + self.assertTrue(ct) + def test_get_all(self): eq = self.assertEqual msg = self._msgobj('msg_20.txt')