# HG changeset patch # User Stephanie Marcu # Date 1284540865 -7200 # Node ID d9ebb391782cdcf7c561b7a15c8c5708785badc4 # Parent 115d9799b67c590be5050b93fcdd01a5852e8944 [book - #1251260] add a warning in automatic test when user redefine the base class diff -r 115d9799b67c -r d9ebb391782c 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 -------------------------------