--- a/devtools/_apptest.py Mon Aug 03 09:37:13 2009 +0200
+++ b/devtools/_apptest.py Mon Aug 03 10:50:57 2009 +0200
@@ -14,7 +14,7 @@
import yams.schema
from cubicweb.dbapi import repo_connect, ConnectionProperties, ProgrammingError
-from cubicweb.cwvreg import CubicWebRegistry
+from cubicweb.cwvreg import CubicWebVRegistry
from cubicweb.web.application import CubicWebPublisher
from cubicweb.web import Redirect
@@ -79,7 +79,7 @@
source = config.sources()['system']
if verbose:
print "init test database ..."
- self.vreg = vreg = CubicWebRegistry(config)
+ self.vreg = vreg = CubicWebVRegistry(config)
self.admlogin = source['db-user']
# restore database <=> init database
self.restore_database()
@@ -191,7 +191,7 @@
optional_args = {}
optional_args['vid'] = vid
req = self.create_request(rql=rql, **optional_args)
- return self.vreg.main_template(req, template)
+ return self.vreg['views'].main_template(req, template)
def call_edit(self, req):
"""shortcut for self.app.edit()"""
@@ -207,7 +207,7 @@
def iter_possible_views(self, req, rset):
"""returns a list of possible vids for <rql>"""
- for view in self.vreg.possible_views(req, rset):
+ for view in self.vreg['views'].possible_views(req, rset):
if view.category == 'startupview':
continue
yield view.id
@@ -216,7 +216,7 @@
def iter_startup_views(self, req):
"""returns the list of startup views"""
- for view in self.vreg.possible_views(req, None):
+ for view in self.vreg['views'].possible_views(req, None):
if view.category != 'startupview':
continue
yield view.id
@@ -233,7 +233,7 @@
if verbose:
print "init test database ..."
source = config.sources()['system']
- self.vreg = CubicWebRegistry(config)
+ self.vreg = CubicWebVRegistry(config)
self.cnx = init_test_database(driver=source['db-driver'],
vreg=self.vreg)[1]
if verbose: