[skeleton] fix new class configuration in realdbtest stable
authorJulien Jehannet <julien.jehannet@logilab.fr>
Tue, 07 Jun 2011 11:42:08 +0200
branchstable
changeset 7856 51a3fb272bf3
parent 7855 54283a5b7afc
child 7858 f91255a3b2c2
[skeleton] fix new class configuration in realdbtest
devtools/__init__.py
doc/book/en/devrepo/testing.rst
skeleton/test/realdb_test_CUBENAME.py
--- 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):