Commit b919e0b5 authored by Jérome Perrin's avatar Jérome Perrin

ui_test_core: force content type as text/plain in MailHost_reportMessageList

Otherwise this is interpreted as text/html after sending html emails
parent 737a1971
......@@ -17,4 +17,13 @@ for mail in message_list:
print ""
print "Total messages: %s" %len(message_list)
# If messages "looks like html", zope will set content type to text/html,
# and the assertTextPresent from selenium will be applied after the emails
# are interpreted as html.
# For example, the email "Name <email@example.com>" would be interpreted as
# an html entity and we cannot use assertTextPresent on it.
# To prevent that, we force content type to text.
container.REQUEST.RESPONSE.setHeader('Content-Type', 'text/plain;charset=utf-8')
return printed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment