Issue #19590: Use specific asserts in email tests.

This commit is contained in:
Serhiy Storchaka 2013-11-16 12:56:23 +02:00
parent 9c10d6b800
commit 328cf3cbdf
4 changed files with 92 additions and 107 deletions

View file

@ -18,7 +18,7 @@ class TestCustomMessage(TestEmailBase):
msg = email.message_from_string("Subject: bogus\n\nmsg\n",
self.MyMessage,
policy=self.MyPolicy)
self.assertTrue(isinstance(msg, self.MyMessage))
self.assertIsInstance(msg, self.MyMessage)
self.assertIs(msg.check_policy, self.MyPolicy)
def test_custom_message_gets_policy_if_possible_from_file(self):
@ -26,7 +26,7 @@ class TestCustomMessage(TestEmailBase):
msg = email.message_from_file(source_file,
self.MyMessage,
policy=self.MyPolicy)
self.assertTrue(isinstance(msg, self.MyMessage))
self.assertIsInstance(msg, self.MyMessage)
self.assertIs(msg.check_policy, self.MyPolicy)
# XXX add tests for other functions that take Message arg.