diff options
author | Barry Warsaw <barry@list.org> | 2008-12-01 23:25:33 -0500 |
---|---|---|
committer | Barry Warsaw <barry@list.org> | 2008-12-01 23:25:33 -0500 |
commit | 2da8819928e6b010eb6c9d34c71a4f9f0287af9b (patch) | |
tree | 7ad0054577c7e457a94ecec5cd55d0003c2c2f08 /tests/test_handlers.py | |
parent | 0e6f7c1fc99eb7e35c23695bca2c17e757baf514 (diff) | |
parent | f579d5c290b80e00974e8c034f9d6dd697fcdfa6 (diff) | |
download | mailman2-2da8819928e6b010eb6c9d34c71a4f9f0287af9b.tar.gz mailman2-2da8819928e6b010eb6c9d34c71a4f9f0287af9b.tar.xz mailman2-2da8819928e6b010eb6c9d34c71a4f9f0287af9b.zip |
Merge Mark's changes to complete the Python 2.6 compatibility.
Diffstat (limited to 'tests/test_handlers.py')
-rw-r--r-- | tests/test_handlers.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/test_handlers.py b/tests/test_handlers.py index 17e5ec96..7b053c65 100644 --- a/tests/test_handlers.py +++ b/tests/test_handlers.py @@ -133,7 +133,7 @@ From: aperson@dom.ain eq(str(str(qmsg['subject'])), '_xtest post acknowledgement') eq(qmsg['to'], 'aperson@dom.ain') eq(qmsg['from'], '_xtest-bounces@dom.ain') - eq(qmsg.get_type(), 'text/plain') + eq(qmsg.get_content_type(), 'text/plain') eq(qmsg.get_param('charset'), 'us-ascii') msgid = qmsg['message-id'] self.failUnless(msgid.startswith('<mailman.')) @@ -173,7 +173,7 @@ Subject: Wish you were here eq(str(qmsg['subject']), '_xtest post acknowledgement') eq(qmsg['to'], 'aperson@dom.ain') eq(qmsg['from'], '_xtest-bounces@dom.ain') - eq(qmsg.get_type(), 'text/plain') + eq(qmsg.get_content_type(), 'text/plain') eq(qmsg.get_param('charset'), 'us-ascii') msgid = qmsg['message-id'] self.failUnless(msgid.startswith('<mailman.')) @@ -1168,7 +1168,7 @@ yyy MimeDel.process(self._mlist, msg, {}) eq(len(msg.get_payload()), 1) subpart = msg.get_payload(0) - eq(subpart.get_type(), 'image/gif') + eq(subpart.get_content_type(), 'image/gif') eq(subpart.get_payload(), 'yyy') def test_collapse_multipart_alternative(self): @@ -1199,9 +1199,9 @@ yyy """) MimeDel.process(self._mlist, msg, {}) eq(len(msg.get_payload()), 1) - eq(msg.get_type(), 'multipart/mixed') + eq(msg.get_content_type(), 'multipart/mixed') subpart = msg.get_payload(0) - eq(subpart.get_type(), 'image/gif') + eq(subpart.get_content_type(), 'image/gif') eq(subpart.get_payload(), 'yyy') def test_convert_to_plaintext(self): @@ -1216,7 +1216,7 @@ MIME-Version: 1.0 <body></body></html> """) MimeDel.process(self._mlist, msg, {}) - eq(msg.get_type(), 'text/plain') + eq(msg.get_content_type(), 'text/plain') eq(msg.get_payload(), '\n\n\n') def test_deep_structure(self): @@ -1265,13 +1265,13 @@ aaa payload = msg.get_payload() eq(len(payload), 3) part1 = msg.get_payload(0) - eq(part1.get_type(), 'text/plain') + eq(part1.get_content_type(), 'text/plain') eq(part1.get_payload(), 'A different message') part2 = msg.get_payload(1) - eq(part2.get_type(), 'image/gif') + eq(part2.get_content_type(), 'image/gif') eq(part2.get_payload(), 'zzz') part3 = msg.get_payload(2) - eq(part3.get_type(), 'image/gif') + eq(part3.get_content_type(), 'image/gif') eq(part3.get_payload(), 'aaa') def test_top_multipart_alternative(self): @@ -1292,7 +1292,7 @@ This is plain text --AAA-- """) MimeDel.process(self._mlist, msg, {}) - eq(msg.get_type(), 'text/plain') + eq(msg.get_content_type(), 'text/plain') eq(msg.get_payload(), 'This is plain text') |