c.t.m.MockDbConnection : class documentation

Part of canonical.testing.mockdb View In Hierarchy

Connection to our Mock database.
Method __init__ Initialize the MockDbConnection.
Method cursor As per DB-API.
Method close As per DB-API.
Method commit As per DB-API.
Method rollback As per DB-API.
Method set_isolation_level As per psycopg1 extension.
Method _checkClosed Guard that raises an exception if the connection is closed.
def __init__(self, script, real_connection, *args, **kw):
Initialize the `MockDbConnection`.

`MockDbConnection` intances are generally only created in the
*Script.connect() methods as the attempt needs to be recorded
(even if it fails).

If we have a real_connection, we are proxying and recording results.
If real_connection is None, we are replaying results from the script.

*args and **kw are the arguments passed to open the real connection
and are used by the script to confirm the db connection details have
not been changed; a `RetryTest` exception may be raised in replay mode.
def cursor(self):
As per DB-API.
def _checkClosed(self):
Guard that raises an exception if the connection is closed.
def close(self):
As per DB-API.
def commit(self):
As per DB-API.
def rollback(self):
As per DB-API.
def set_isolation_level(self, level):
As per psycopg1 extension.
API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.