summaryrefslogtreecommitdiffstats
path: root/Lib/email/test
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2010-12-21 18:12:50 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2010-12-21 18:12:50 (GMT)
commita993b2d5dee93909c4e2e0c77075f92ca560abf5 (patch)
tree580b1221deb8327d869e94772d9807970085fdc7 /Lib/email/test
parentda29acd96d0446839718d0596af84e4039f7c5c2 (diff)
downloadcpython-a993b2d5dee93909c4e2e0c77075f92ca560abf5.zip
cpython-a993b2d5dee93909c4e2e0c77075f92ca560abf5.tar.gz
cpython-a993b2d5dee93909c4e2e0c77075f92ca560abf5.tar.bz2
Merged revisions 87415 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87415 | r.david.murray | 2010-12-21 13:07:59 -0500 (Tue, 21 Dec 2010) | 4 lines Fix the change made for issue 1243654. Surprisingly, it turns out there was no test that exercised this code path. ........
Diffstat (limited to 'Lib/email/test')
-rw-r--r--Lib/email/test/test_email.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index 7a1d699..358b6a7 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -179,6 +179,17 @@ class TestMessageAPI(TestEmailBase):
self.assertRaises(Errors.HeaderParseError,
msg.set_boundary, 'BOUNDARY')
+ def test_make_boundary(self):
+ msg = MIMEMultipart('form-data')
+ # Note that when the boundary gets created is an implementation
+ # detail and might change.
+ self.assertEqual(msg.items()[0][1], 'multipart/form-data')
+ # Trigger creation of boundary
+ msg.as_string()
+ self.assertEqual(msg.items()[0][1][:33],
+ 'multipart/form-data; boundary="==')
+ # XXX: there ought to be tests of the uniqueness of the boundary, too.
+
def test_message_rfc822_only(self):
# Issue 7970: message/rfc822 not in multipart parsed by
# HeaderParser caused an exception when flattened.