[sql generation test] avoid lgdb warnings when a db module is faked stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 30 Mar 2011 13:59:23 +0200
branchstable
changeset 7142 c47381851a3e
parent 7140 ba51dac1115d
child 7143 0517e3bf0b84
[sql generation test] avoid lgdb warnings when a db module is faked
server/test/unittest_rql2sql.py
--- a/server/test/unittest_rql2sql.py	Wed Mar 30 11:17:21 2011 +0200
+++ b/server/test/unittest_rql2sql.py	Wed Mar 30 13:59:23 2011 +0200
@@ -38,6 +38,7 @@
 except AssertionError, ex:
     pass # already registered
 
+
 from logilab import database as db
 def monkey_patch_import_driver_module(driver, drivers, quiet=True):
     if not driver in drivers:
@@ -53,7 +54,7 @@
                 print >> sys.stderr, '%s is not available' % modname
             continue
     else:
-        return None, drivers[driver][0]
+        return mock_object(STRING=1, BOOLEAN=2, BINARY=3, DATETIME=4, NUMBER=5), drivers[driver][0]
     return module, modname