l.t.f.FakeTransaction : class documentation

Part of lp.testing.faketransaction View In Hierarchy

Fake transaction manager.

Use this instead of transaction (or the old Zopeless transaction manager) in tests if you don't really want to commit anything.

Set log_calls to True to enable printing of commits and aborts.

Method __init__ Undocumented
Method begin Pretend to begin a transaction. Does not log.
Method commit Pretend to commit.
Method abort Pretend to roll back.
Method _log Print calls that are being made, if desired.
def __init__(self, log_calls=False):
Undocumented
def _log(self, call):
Print calls that are being made, if desired.
def begin(self):
Pretend to begin a transaction. Does not log.
def commit(self):
Pretend to commit.
def abort(self):
Pretend to roll back.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.