def test_unicode_test_fails_warning(self):
class MockCursor(engines.DBAPIProxyCursor):
- def execute(self, stmt, params=None):
+ def execute(self, stmt, params=None, **kw):
if "test unicode returns" in stmt:
raise self.engine.dialect.dbapi.DatabaseError("boom")
else:
- return super(MockCursor, self).execute(stmt, params)
+ return super(MockCursor, self).execute(stmt, params, **kw)
eng = engines.proxying_engine(cursor_cls=MockCursor)
assert_raises_message(
tsa.exc.SAWarning,
self.connection = conn
self.cursor = conn.cursor()
- def execute(self, stmt, parameters=None):
+ def execute(self, stmt, parameters=None, **kw):
if parameters:
- return self.cursor.execute(stmt, parameters)
+ return self.cursor.execute(stmt, parameters, **kw)
else:
- return self.cursor.execute(stmt)
+ return self.cursor.execute(stmt, **kw)
- def executemany(self, stmt, params):
- return self.cursor.executemany(stmt, params)
+ def executemany(self, stmt, params, **kw):
+ return self.cursor.executemany(stmt, params, **kw)
def __getattr__(self, key):
return getattr(self.cursor, key)
"""Proxy a DBAPI connection.
Tests can provide subclasses of this to intercept
- DBAPI-level cursor operations.
+ DBAPI-level connection operations.
"""
def __init__(self, engine, cursor_cls):