[test] Add a trivial test for "wdoc" view 3.26
authorDenis Laxalde <denis.laxalde@logilab.fr>
Thu, 28 Jun 2018 10:07:20 +0200
branch3.26
changeset 12335 ec2ab8dc93a2
parent 12334 4c0f7ef3145c
child 12336 90ff36da4c8e
[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.
cubicweb/web/test/unittest_views_wdoc.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/web/test/unittest_views_wdoc.py	Thu Jun 28 10:07:20 2018 +0200
@@ -0,0 +1,14 @@
+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()