--- a/devtools/__init__.py Fri Sep 23 12:16:29 2011 +0200
+++ b/devtools/__init__.py Tue Jun 07 11:42:08 2011 +0200
@@ -260,8 +260,9 @@
Example usage::
class MyTests(CubicWebTC):
- _config = RealDatabseConfiguration('myapp',
- sourcefile='/path/to/sources')
+ _config = RealDatabaseConfiguration('myapp',
+ sourcefile='/path/to/sources')
+
def test_something(self):
rset = self.execute('Any X WHERE X is CWUser')
self.view('foaf', rset)
--- a/doc/book/en/devrepo/testing.rst Fri Sep 23 12:16:29 2011 +0200
+++ b/doc/book/en/devrepo/testing.rst Tue Jun 07 11:42:08 2011 +0200
@@ -337,13 +337,12 @@
sourcefile='/path/to/realdb_sources')
def test_blog_rss(self):
- req = self.request()
- rset = req.execute('Any B ORDERBY D DESC WHERE B is BlogEntry, '
- 'B created_by U, U login "logilab", B creation_date D')
+ req = self.request()
+ rset = req.execute('Any B ORDERBY D DESC WHERE B is BlogEntry, '
+ 'B created_by U, U login "logilab", B creation_date D')
self.view('rss', rset)
-
Testing with other cubes
------------------------
--- a/skeleton/test/realdb_test_CUBENAME.py Fri Sep 23 12:16:29 2011 +0200
+++ b/skeleton/test/realdb_test_CUBENAME.py Tue Jun 07 11:42:08 2011 +0200
@@ -18,8 +18,8 @@
"""
"""
-from cubicweb.devtools import buildconfig, loadconfig
-from cubicweb.devtools.testlib import RealDBTest
+from cubicweb.devtools.testlib import CubicWebTC
+from cubicweb.devtools.realdbtest import buildconfig, loadconfig
def setUpModule(options):
if options.source:
@@ -32,7 +32,8 @@
options.epassword)
RealDatabaseTC.configcls = configcls
-class RealDatabaseTC(RealDBTest):
+
+class RealDatabaseTC(CubicWebTC):
configcls = None # set by setUpModule()
def test_all_primaries(self):