mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #19590: Use specific asserts in email tests.
This commit is contained in:
parent
9c10d6b800
commit
328cf3cbdf
4 changed files with 92 additions and 107 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue