[devtools] CubicWebTC._check_html may have to deal with unicode or bytes
If called with template=None, CubicWebTC.view will not go through
main-template, and return the unicode data from the view directly
instead of encoded data.
--- a/devtools/testlib.py Thu Oct 01 12:02:02 2015 +0200
+++ b/devtools/testlib.py Thu Oct 01 12:15:14 2015 +0200
@@ -981,6 +981,9 @@
def _check_html(self, output, view, template='main-template'):
"""raises an exception if the HTML is invalid"""
output = output.strip()
+ if isinstance(output, text_type):
+ # XXX
+ output = output.encode('utf-8')
validator = self.get_validator(view, output=output)
if validator is None:
return output # return raw output if no validator is defined