Skip to content
Snippets Groups Projects
unittest_views.py 603 B
Newer Older
from cubicweb_web.devtools.testlib import WebCWTC
from cubicweb.devtools.htmlparser import XMLValidator


class BoostrapTheMainTemplateTC(WebCWTC):
    def test_valid_xhtml_index(self):
        with self.admin_access.web_request() as req:
Laurent Peuch's avatar
Laurent Peuch committed
            self.view("index", req=req)
Laurent Peuch's avatar
Laurent Peuch committed
        valid = self.content_type_validators.get("text/html", XMLValidator)()
        with self.admin_access.web_request() as req:
Laurent Peuch's avatar
Laurent Peuch committed
            valid.parse_string(self.vreg["views"].main_template(req, "error-template"))
Laurent Peuch's avatar
Laurent Peuch committed
if __name__ == "__main__":