equal
deleted
inserted
replaced
187 .. _automatic_views_tests: |
187 .. _automatic_views_tests: |
188 |
188 |
189 Automatic views testing |
189 Automatic views testing |
190 ----------------------- |
190 ----------------------- |
191 |
191 |
192 This is done automatically with the AutomaticWebTest class. At cube |
192 This is done automatically with the :class:`cubicweb.devtools.testlib.AutomaticWebTest` |
193 creation time, the mycube/test/test_mycube.py file contains such a |
193 class. At cube creation time, the mycube/test/test_mycube.py file |
194 test. The code here has to be uncommented to be usable, without |
194 contains such a test. The code here has to be uncommented to be |
195 further modification. |
195 usable, without further modification. |
196 |
196 |
197 The ``auto_populate`` method uses a smart algorithm to create |
197 The ``auto_populate`` method uses a smart algorithm to create |
198 pseudo-random data in the database, thus enabling the views to be |
198 pseudo-random data in the database, thus enabling the views to be |
199 invoked and tested. |
199 invoked and tested. |
200 |
200 |
209 * `no_auto_populate`, may contain a list of entity types to skip |
209 * `no_auto_populate`, may contain a list of entity types to skip |
210 * `ignored_relations`, may contain a list of relation types to skip |
210 * `ignored_relations`, may contain a list of relation types to skip |
211 * `application_rql`, may contain a list of rql expressions that |
211 * `application_rql`, may contain a list of rql expressions that |
212 auto_populate cannot guess by itself; these must yield resultsets |
212 auto_populate cannot guess by itself; these must yield resultsets |
213 against which views may be selected. |
213 against which views may be selected. |
|
214 |
|
215 .. warning:: |
|
216 |
|
217 Take care to not let the imported `AutomaticWebTest` in your test module |
|
218 namespace, else both your subclass *and* this parent class will be run. |
214 |
219 |
215 Testing on a real-life database |
220 Testing on a real-life database |
216 ------------------------------- |
221 ------------------------------- |
217 |
222 |
218 The ``CubicWebTC`` class uses the `cubicweb.devtools.ApptestConfiguration` |
223 The ``CubicWebTC`` class uses the `cubicweb.devtools.ApptestConfiguration` |