cubicweb/web/test/unittest_views_wdoc.py
author Denis Laxalde <denis.laxalde@logilab.fr>
Mon, 11 Jun 2018 16:50:38 +0200
branch3.26
changeset 12425 8b3f1d1f0939
parent 12337 04ff0d3ef1d3
permissions -rw-r--r--
[test] Update webconfig's tests accounting for cubicweb-file being now a package WebconfigTC.test_locate_all_files and WebconfigTC.test_locate_resource assumed that cubicweb-file was installed in <share>/cubes/file whereas, from the latest release, it is now a standard Python package thus installed in site-packages as cubicweb_file. We simply update base directory of these two tests.

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()