[Zodb-checkins] CVS: StandaloneZODB/ZODB/tests - StorageTestBase.py:1.11.4.1
Barry Warsaw
barry@wooz.org
Wed, 23 Jan 2002 17:18:56 -0500
Update of /cvs-repository/StandaloneZODB/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv21628
Modified Files:
Tag: Recovery
StorageTestBase.py
Log Message:
Merging trunk changes into the Recovery branch.
=== StandaloneZODB/ZODB/tests/StorageTestBase.py 1.11 => 1.11.4.1 ===
def _dostore(self, oid=None, revid=None, data=None, version=None,
- already_pickled=0):
+ already_pickled=0, user=None, description=None):
"""Do a complete storage transaction. The defaults are:
- oid=None, ask the storage for a new oid
@@ -148,15 +148,18 @@
version = ''
# Begin the transaction
t = Transaction()
+ if user is not None:
+ t.user = user
+ if description is not None:
+ t.description = description
self._storage.tpc_begin(t)
- self._transaction = t
# Store an object
r1 = self._storage.store(oid, revid, data, version, t)
# Finish the transaction
r2 = self._storage.tpc_vote(t)
self._storage.tpc_finish(t)
- self._transaction = None
return handle_serials(oid, r1, r2)
- def _dostoreNP(self, oid=None, revid=None, data=None, version=None):
+ def _dostoreNP(self, oid=None, revid=None, data=None, version=None,
+ user=None, description=None):
return self._dostore(oid, revid, data, version, already_pickled=1)