mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Add a test for get_all() returning failobj. msg_20.txt is a sample
message with multiple CC: fields, used in the get_all() test.
This commit is contained in:
parent
9300a75c88
commit
2f6a0b00a0
2 changed files with 28 additions and 0 deletions
|
@ -50,6 +50,12 @@ class TestEmailBase(unittest.TestCase):
|
|||
|
||||
# Test various aspects of the Message class's API
|
||||
class TestMessageAPI(TestEmailBase):
|
||||
def test_get_all(self):
|
||||
eq = self.assertEqual
|
||||
msg = self._msgobj('msg_20.txt')
|
||||
eq(msg.get_all('cc'), ['ccc@zzz.org', 'ddd@zzz.org', 'eee@zzz.org'])
|
||||
eq(msg.get_all('xx', 'n/a'), 'n/a')
|
||||
|
||||
def test_get_charsets(self):
|
||||
eq = self.assertEqual
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue