Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
c47381851a3e
Commit
96f0ca50
authored
Mar 30, 2011
by
Sylvain Thénault
Browse files
[sql generation test] avoid lgdb warnings when a db module is faked
--HG-- branch : stable
parent
ba51dac1115d
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/test/unittest_rql2sql.py
View file @
c4738185
...
...
@@ -38,6 +38,7 @@ try:
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 @@ def monkey_patch_import_driver_module(driver, drivers, quiet=True):
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment