Make sure html_to_text processes bytes

This commit is contained in:
Umair Khan
2016-07-13 11:11:06 +05:00
parent dcc0d1de20
commit 555c34d7a8
2 changed files with 8 additions and 4 deletions

View File

@@ -306,6 +306,7 @@ def extract_reply_and_check(filename):
msg_body = f.read()
reply = quotations.extract_from_html(msg_body)
plain_reply = u.html_to_text(reply)
plain_reply = plain_reply.decode('utf8')
eq_(RE_WHITESPACE.sub('', "Hi. I am fine.\n\nThanks,\nAlex"),
RE_WHITESPACE.sub('', plain_reply))