return params
else:
def proc(d):
- if d is None:
- return None
+ # sigh, sometimes we get positional arguments with a dialect
+ # that doesnt specify positional (because of execute_text())
+ if not isinstance(d, dict):
+ return d
return dict([(k.encode(self.dialect.encoding), d[k]) for k in d])
if isinstance(params, list):
return [proc(d) for d in params]
assert res.fetchall() == [(1, "jack"), (2, "fred"), (3, "ed"), (4, "horse"), (5, "barney"), (6, "donkey"), (7, 'sally')]
conn.execute("delete from users")
- @testbase.supported('mysql')
+ @testbase.supported('mysql', 'postgres')
def test_raw_sprintf(self):
for conn in (testbase.db, testbase.db.connect()):
conn.execute("insert into users (user_id, user_name) values (%s, %s)", [1,"jack"])