c.t.m.ScriptPlayer : class documentation

Part of canonical.testing.mockdb View In Hierarchy

Replay database queries from a script.
Method __init__ Undocumented
Method getNextEntry Pull the next entry from the script.
Method connect Return a MockDbConnection.
Method cursor Return a MockDbCursor.
Method execute Handle Cursor.execute().
Method close Handle Connection.close().
Method commit Handle Connection.commit().
Method rollback Handle Connection.rollback().
Method set_isolation_level Handle Connection.set_isolation_level().
Method handleInvalidScript Remove the script from disk and raise a RetryTest exception.
def __init__(self, key):
Undocumented
def getNextEntry(self, connection, expected_entry_class):
Pull the next entry from the script.

Invokes handleInvalidScript on error, including some entry validation.

@noop_if_invalid
def connect(self, connect_func, *args, **kw):
Return a MockDbConnection.

Does not actually connect to the database - we are in replay mode.

def cursor(self, connection):
Return a MockDbCursor.
@noop_if_invalid
def execute(self, cursor, query, params=None):
Handle Cursor.execute().
@noop_if_invalid
def close(self, connection):
Handle Connection.close().
def commit(self, connection):
Handle Connection.commit().
@noop_if_invalid
def rollback(self, connection):
Handle Connection.rollback().
@noop_if_invalid
def set_isolation_level(self, connection, level):
Handle Connection.set_isolation_level().
def handleInvalidScript(self, reason):
Remove the script from disk and raise a RetryTest exception.
API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.