[book - #1251260] add a warning in automatic test when user redefine the base class stable
authorStephanie Marcu <stephanie.marcu@logilab.fr>
Wed, 15 Sep 2010 10:54:25 +0200
branchstable
changeset 6242 d9ebb391782c
parent 6241 115d9799b67c
child 6243 c0ee416040fa
[book - #1251260] add a warning in automatic test when user redefine the base class
doc/book/en/devrepo/testing.rst
--- a/doc/book/en/devrepo/testing.rst	Wed Sep 15 08:06:13 2010 +0200
+++ b/doc/book/en/devrepo/testing.rst	Wed Sep 15 10:54:25 2010 +0200
@@ -189,10 +189,10 @@
 Automatic views testing
 -----------------------
 
-This is done automatically with the AutomaticWebTest class. At cube
-creation time, the mycube/test/test_mycube.py file contains such a
-test. The code here has to be uncommented to be usable, without
-further modification.
+This is done automatically with the :class:`cubicweb.devtools.testlib.AutomaticWebTest`
+class. At cube creation time, the mycube/test/test_mycube.py file
+contains such a test. The code here has to be uncommented to be
+usable, without further modification.
 
 The ``auto_populate`` method uses a smart algorithm to create
 pseudo-random data in the database, thus enabling the views to be
@@ -212,6 +212,11 @@
   auto_populate cannot guess by itself; these must yield resultsets
   against which views may be selected.
 
+.. warning::
+
+  Take care to not let the imported `AutomaticWebTest` in your test module
+  namespace, else both your subclass *and* this parent class will be run.
+
 Testing on a real-life database
 -------------------------------