summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_email.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2002-05-22 01:52:10 (GMT)
committerBarry Warsaw <barry@python.org>2002-05-22 01:52:10 (GMT)
commit4be9eccbc404f8173bdbc4720421b451a5879cc0 (patch)
tree31662ba86952f9978e220ec6cd5adedaaca6406e /Lib/test/test_email.py
parentc421ad4a35513c5dd2121a7c85ce5f3085d299a1 (diff)
downloadcpython-4be9eccbc404f8173bdbc4720421b451a5879cc0.zip
cpython-4be9eccbc404f8173bdbc4720421b451a5879cc0.tar.gz
cpython-4be9eccbc404f8173bdbc4720421b451a5879cc0.tar.bz2
getaddresses(): Like the change in rfc822.py, this one needs to access
the AddressList.addresslist attribute directly. Also, add a test case for the email.Utils.getaddresses() interface.
Diffstat (limited to 'Lib/test/test_email.py')
-rw-r--r--Lib/test/test_email.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_email.py b/Lib/test/test_email.py
index c4b185a..f0c8f1a 100644
--- a/Lib/test/test_email.py
+++ b/Lib/test/test_email.py
@@ -1235,6 +1235,13 @@ class TestMiscellaneous(unittest.TestCase):
eq(cset1, cset2)
eq(cset2, cset1)
+ def test_getaddresses(self):
+ eq = self.assertEqual
+ eq(Utils.getaddresses(['aperson@dom.ain (Al Person)',
+ 'Bud Person <bperson@dom.ain>']),
+ [('Al Person', 'aperson@dom.ain'),
+ ('Bud Person', 'bperson@dom.ain')])
+
# Test the iterator/generators