cubicweb/web/test/unittest_views_wdoc.py
author Denis Laxalde <denis.laxalde@logilab.fr>
Thu, 28 Jun 2018 10:07:20 +0200
branch3.26
changeset 12335 ec2ab8dc93a2
child 12337 04ff0d3ef1d3
permissions -rw-r--r--
[test] Add a trivial test for "wdoc" view We just make sure it gets rendered without errors (which wasn't the case before the previous patch). It does not work on Python 3; this will be fixed in next changeset.

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)


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