@@ -186,7 +186,7 @@ def testMultipartMixed(self):
186186 text/plain
187187 application/pdf""" ,
188188 ('foo\n ' ,
189- [('foo.pdf' , 'application/pdf' , 'foo\n ' )], False ))
189+ [('foo.pdf' , 'application/pdf' , b 'foo\n ' )], False ))
190190
191191 def testMultipartMixedHtml (self ):
192192 # test with html conversion enabled
@@ -197,7 +197,7 @@ def testMultipartMixedHtml(self):
197197 ('bar >\n ' ,
198198 [('bar.html' , 'text/html' ,
199199 '<html><body>bar ></body></html>\n ' ),
200- ('foo.pdf' , 'application/pdf' , 'foo\n ' )], False ),
200+ ('foo.pdf' , 'application/pdf' , b 'foo\n ' )], False ),
201201 convert_html_with = 'dehtml' )
202202
203203 # test with html conversion disabled
@@ -208,15 +208,15 @@ def testMultipartMixedHtml(self):
208208 (None ,
209209 [('bar.html' , 'text/html' ,
210210 '<html><body>bar ></body></html>\n ' ),
211- ('foo.pdf' , 'application/pdf' , 'foo\n ' )], False ),
211+ ('foo.pdf' , 'application/pdf' , b 'foo\n ' )], False ),
212212 convert_html_with = False )
213213
214214 def testMultipartAlternative (self ):
215215 self .TestExtraction ("""
216216multipart/alternative
217217 text/plain
218218 application/pdf
219- """ , ('foo\n ' , [('foo.pdf' , 'application/pdf' , 'foo\n ' )], False ))
219+ """ , ('foo\n ' , [('foo.pdf' , 'application/pdf' , b 'foo\n ' )], False ))
220220
221221 def testMultipartAlternativeHtml (self ):
222222 self .TestExtraction ("""
@@ -226,7 +226,7 @@ def testMultipartAlternativeHtml(self):
226226 ('bar >\n ' ,
227227 [('bar.html' , 'text/html' ,
228228 '<html><body>bar ></body></html>\n ' ),
229- ('foo.pdf' , 'application/pdf' , 'foo\n ' )], False ),
229+ ('foo.pdf' , 'application/pdf' , b 'foo\n ' )], False ),
230230 convert_html_with = 'dehtml' )
231231
232232 self .TestExtraction ("""
@@ -236,7 +236,7 @@ def testMultipartAlternativeHtml(self):
236236 (None ,
237237 [('bar.html' , 'text/html' ,
238238 '<html><body>bar ></body></html>\n ' ),
239- ('foo.pdf' , 'application/pdf' , 'foo\n ' )], False ),
239+ ('foo.pdf' , 'application/pdf' , b 'foo\n ' )], False ),
240240 convert_html_with = False )
241241
242242 def testMultipartAlternativeHtmlText (self ):
@@ -249,7 +249,7 @@ def testMultipartAlternativeHtmlText(self):
249249 ('foo\n ' ,
250250 [('bar.html' , 'text/html' ,
251251 '<html><body>bar ></body></html>\n ' ),
252- ('foo.pdf' , 'application/pdf' , 'foo\n ' )], False ),
252+ ('foo.pdf' , 'application/pdf' , b 'foo\n ' )], False ),
253253 convert_html_with = 'dehtml' )
254254
255255 # text should take priority over html when text is first
@@ -261,7 +261,7 @@ def testMultipartAlternativeHtmlText(self):
261261 ('foo\n ' ,
262262 [('bar.html' , 'text/html' ,
263263 '<html><body>bar ></body></html>\n ' ),
264- ('foo.pdf' , 'application/pdf' , 'foo\n ' )], False ),
264+ ('foo.pdf' , 'application/pdf' , b 'foo\n ' )], False ),
265265 convert_html_with = 'dehtml' )
266266
267267 # text should take priority over html when text is second and
@@ -274,7 +274,7 @@ def testMultipartAlternativeHtmlText(self):
274274 ('foo\n ' ,
275275 [('bar.html' , 'text/html' ,
276276 '<html><body>bar ></body></html>\n ' ),
277- ('foo.pdf' , 'application/pdf' , 'foo\n ' )], False ),
277+ ('foo.pdf' , 'application/pdf' , b 'foo\n ' )], False ),
278278 convert_html_with = False )
279279
280280 # text should take priority over html when text is first and
@@ -287,7 +287,7 @@ def testMultipartAlternativeHtmlText(self):
287287 ('foo\n ' ,
288288 [('bar.html' , 'text/html' ,
289289 '<html><body>bar ></body></html>\n ' ),
290- ('foo.pdf' , 'application/pdf' , 'foo\n ' )], False ),
290+ ('foo.pdf' , 'application/pdf' , b 'foo\n ' )], False ),
291291 convert_html_with = False )
292292
293293 def testDeepMultipartAlternative (self ):
@@ -296,7 +296,7 @@ def testDeepMultipartAlternative(self):
296296 multipart/alternative
297297 text/plain
298298 application/pdf
299- """ , ('foo\n ' , [('foo.pdf' , 'application/pdf' , 'foo\n ' )], False ))
299+ """ , ('foo\n ' , [('foo.pdf' , 'application/pdf' , b 'foo\n ' )], False ))
300300
301301 def testSignedText (self ):
302302 self .TestExtraction ("""
@@ -312,15 +312,15 @@ def testSignedAttachments(self):
312312 application/pdf
313313 application/pgp-signature""" ,
314314 ('foo\n ' ,
315- [('foo.pdf' , 'application/pdf' , 'foo\n ' )], False ))
315+ [('foo.pdf' , 'application/pdf' , b 'foo\n ' )], False ))
316316
317317 def testAttachedSignature (self ):
318318 self .TestExtraction ("""
319319multipart/mixed
320320 text/plain
321321 application/pgp-signature""" ,
322322 ('foo\n ' ,
323- [('foo.gpg' , 'application/pgp-signature' , 'foo\n ' )], False ))
323+ [('foo.gpg' , 'application/pgp-signature' , b 'foo\n ' )], False ))
324324
325325 def testMessageRfc822 (self ):
326326 self .TestExtraction ("""
0 commit comments