[testlib] make self.view() return raw output if no validator is used
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 22 Sep 2011 09:56:20 +0200
changeset 7821 3ecd114f6d75
parent 7816 a8a424a78c26
child 7827 9bbf83f68bcc
[testlib] make self.view() return raw output if no validator is used This will make it possible to parse and test view's output even if no validator is associated to the view's content type.
devtools/testlib.py
--- a/devtools/testlib.py	Wed Sep 21 17:38:44 2011 +0200
+++ b/devtools/testlib.py	Thu Sep 22 09:56:20 2011 +0200
@@ -828,7 +828,7 @@
         output = output.strip()
         validator = self.get_validator(view, output=output)
         if validator is None:
-            return
+            return output # return raw output if no validator is defined
         if isinstance(validator, htmlparser.DTDValidator):
             # XXX remove <canvas> used in progress widget, unknown in html dtd
             output = re.sub('<canvas.*?></canvas>', '', output)