Part of canonical.testing.mockdb View In Hierarchy
| 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. |
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.