summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_email.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2001-10-09 15:49:35 (GMT)
committerBarry Warsaw <barry@python.org>2001-10-09 15:49:35 (GMT)
commit2f6a0b00a0772424dd49b782df18e36000c082ed (patch)
treeb513086ddf584556d1908ac03330515868e1c312 /Lib/test/test_email.py
parent9300a75c88942ac0dce42db74ffb3b2916bbc64f (diff)
downloadcpython-2f6a0b00a0772424dd49b782df18e36000c082ed.zip
cpython-2f6a0b00a0772424dd49b782df18e36000c082ed.tar.gz
cpython-2f6a0b00a0772424dd49b782df18e36000c082ed.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_email.py')
-rw-r--r--Lib/test/test_email.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_email.py b/Lib/test/test_email.py
index 0a6b808..06aae2b 100644
--- a/Lib/test/test_email.py
+++ b/Lib/test/test_email.py
@@ -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