MCPcopy Index your code
hub / github.com/python/cpython / test_make_boundary

Method test_make_boundary

Lib/test/test_email/test_email.py:207–216  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

205 msg.set_boundary, 'BOUNDARY')
206
207 def test_make_boundary(self):
208 msg = MIMEMultipart('form-data')
209 # Note that when the boundary gets created is an implementation
210 # detail and might change.
211 self.assertEqual(msg.items()[0][1], 'multipart/form-data')
212 # Trigger creation of boundary
213 msg.as_string()
214 self.assertStartsWith(msg.items()[0][1],
215 'multipart/form-data; boundary="==')
216 # XXX: there ought to be tests of the uniqueness of the boundary, too.
217
218 def test_message_rfc822_only(self):
219 # Issue 7970: message/rfc822 not in multipart parsed by

Callers

nothing calls this directly

Calls 5

MIMEMultipartClass · 0.90
assertStartsWithMethod · 0.80
assertEqualMethod · 0.45
itemsMethod · 0.45
as_stringMethod · 0.45

Tested by

no test coverage detected