]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix this test for oursql
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 15 Oct 2011 19:22:21 +0000 (15:22 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 15 Oct 2011 19:22:21 +0000 (15:22 -0400)
test/engine/test_execute.py
test/lib/engines.py

index 3ae4204d21b9d84786887dfdfe5b6b93ecbeaf76..49457644acd1c882d2dd01b464af1f3efcf09b44 100644 (file)
@@ -241,11 +241,11 @@ class ExecuteTest(fixtures.TestBase):
 
     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,
index 69fdeb33706a7a2a12c69c82bc84e66b1fa56342..649c3e31afa72b96a22cfb0ba05baf0ef4e065ed 100644 (file)
@@ -267,14 +267,14 @@ class DBAPIProxyCursor(object):
         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)
@@ -283,7 +283,7 @@ class DBAPIProxyConnection(object):
     """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):