# HG changeset patch # User Alexandre Fayolle # Date 1270574788 -7200 # Node ID 1e96d01728c4ca7d791f772d07e1168c184b4cae # Parent 834269261ae406f175eff30ff89196d34918877a enable live test against sqlserver 2005 database diff -r 834269261ae4 -r 1e96d01728c4 devtools/__init__.py --- a/devtools/__init__.py Tue Apr 06 16:04:37 2010 +0200 +++ b/devtools/__init__.py Tue Apr 06 19:26:28 2010 +0200 @@ -200,6 +200,8 @@ init_test_database_sqlite(config) elif driver == 'postgres': init_test_database_postgres(config) + elif driver == 'sqlserver2005': + init_test_database_sqlserver2005(config, source) else: raise ValueError('no initialization function for driver %r' % driver) config._cubes = None # avoid assertion error @@ -222,11 +224,19 @@ ### postgres test database handling ############################################ def init_test_database_postgres(config): - """initialize a fresh sqlite databse used for testing purpose""" + """initialize a fresh postgresql databse used for testing purpose""" if config.init_repository: from cubicweb.server import init_repository init_repository(config, interactive=False, drop=True) +### sqlserver2005 test database handling ############################################ + +def init_test_database_sqlserver2005(config): + """initialize a fresh sqlserver databse used for testing purpose""" + if config.init_repository: + from cubicweb.server import init_repository + init_repository(config, interactive=False, drop=True, vreg=vreg) + ### sqlite test database handling ##############################################