enable live test against sqlserver 2005 database stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Tue, 06 Apr 2010 19:26:28 +0200
branchstable
changeset 5166 1e96d01728c4
parent 5154 834269261ae4
child 5167 529861a73ec8
enable live test against sqlserver 2005 database
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 ##############################################