# HG changeset patch # User Julien Jehannet # Date 1307439728 -7200 # Node ID 51a3fb272bf3f6d5fe7bde9eb90373e16e8d517b # Parent 54283a5b7afcb8d8acf60216574c703db75d2fe4 [skeleton] fix new class configuration in realdbtest diff -r 54283a5b7afc -r 51a3fb272bf3 devtools/__init__.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) diff -r 54283a5b7afc -r 51a3fb272bf3 doc/book/en/devrepo/testing.rst --- 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 ------------------------ diff -r 54283a5b7afc -r 51a3fb272bf3 skeleton/test/realdb_test_CUBENAME.py --- 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):