Mercurial > p > roundup > code
diff test/test_multipart.py @ 5035:b5bb492e4b3c
Rename TestMessage to ExampleMessage
When py.test is searching for tests it detects TestMessage as a
potential class with test cases because it has 'Test' in its name.
Because TestMessage contains a __init__ constructor py.test returns a
warning that it can't collect tests from it. Lets rename the class to
ExampleMessage to avoid this issue.
| author | John Kristensen <john@jerrykan.com> |
|---|---|
| date | Fri, 21 Aug 2015 17:37:22 +1000 |
| parents | 6e3e4f24c753 |
| children | 364c54991861 |
line wrap: on
line diff
--- a/test/test_multipart.py Thu Aug 20 16:30:50 2015 +1000 +++ b/test/test_multipart.py Fri Aug 21 17:37:22 2015 +1000 @@ -20,7 +20,7 @@ from roundup.mailgw import Message -class TestMessage(Message): +class ExampleMessage(Message): # A note on message/rfc822: The content of such an attachment is an # email with at least one header line. RFC2046 tells us: """ A # media type of "message/rfc822" indicates that the body contains an @@ -160,7 +160,7 @@ self.assert_(p is None) def TestExtraction(self, spec, expected): - self.assertEqual(TestMessage(spec).extract_content(), expected) + self.assertEqual(ExampleMessage(spec).extract_content(), expected) def testTextPlain(self): self.TestExtraction('text/plain', ('foo\n', []))
