MCPcopy Create free account
hub / github.com/Pylons/webtest / test_encode_multipart

Method test_encode_multipart

tests/test_app.py:29–44  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27 self.assertIn(to_bytes('404.html'), data[-1])
28
29 def test_encode_multipart(self):
30 data = self.app.encode_multipart(
31 [], [('file', 'data.txt', b'data')])
32 self.assertIn(to_bytes('data.txt'), data[-1])
33
34 data = self.app.encode_multipart(
35 [], [(b'file', b'data.txt', b'data')])
36 self.assertIn(to_bytes('data.txt'), data[-1])
37
38 data = self.app.encode_multipart(
39 [('key', 'value')], [])
40 self.assertIn(to_bytes('name="key"'), data[-1])
41
42 data = self.app.encode_multipart(
43 [(b'key', b'value')], [])
44 self.assertIn(to_bytes('name="key"'), data[-1])
45
46 def test_encode_multipart_content_type(self):
47 data = self.app.encode_multipart(

Callers

nothing calls this directly

Calls 2

to_bytesFunction · 0.90
encode_multipartMethod · 0.80

Tested by

no test coverage detected