cubicweb/web/test/unittest_views_wdoc.py
author Denis Laxalde <denis.laxalde@logilab.fr>
Fri, 15 Mar 2019 12:12:23 +0100
changeset 12523 4d68d20427de
parent 12337 04ff0d3ef1d3
permissions -rw-r--r--
Skip tests for ldapsource with python >= 3.7 Until someone works on fixing these, this should make our CI green again. I tried to use setupModule() to check for python version, but pre_setup_database() is apparently called even when a SkipTest exception is raised there. So handle this in that method.

from cubicweb.devtools import testlib


class WdocViewsTC(testlib.CubicWebTC):

    def test(self):
        with self.admin_access.web_request(fid='main') as req:
            page = req.view('wdoc')
        self.assertIn(u'Site documentation', page)
        # This part is renderend through rst extension (..winclude directive).
        self.assertIn(u'This web application is based on the CubicWeb knowledge management system',
                      page)


if __name__ == '__main__':
    import unittest
    unittest.main()