--- 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 ##############################################