def proxying_engine(conn_cls=DBAPIProxyConnection, cursor_cls=DBAPIProxyCursor):
 def mock_conn():
  return conn_cls(config.db, cursor_cls)
 return testing_engine(options={'creator': mock_conn})

def proxying_engine ( conn_cls = DBAPIProxyConnection , cursor_cls = DBAPIProxyCursor ) : def mock_conn ( ) : return conn_cls ( config . db , cursor_cls ) return testing_engine ( options = { 'creator' : mock_conn } )
produce an engine that provides proxy hooks for common methods .