[Zodb-checkins] CVS: Zope/lib/python/ZODB/tests - ReadOnlyStorage.py:1.3.6.1
Jeremy Hylton
jeremy@zope.com
Wed, 6 Nov 2002 10:49:47 -0500
Update of /cvs-repository/Zope/lib/python/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv29116
Modified Files:
Tag: Zope-2_6-branch
ReadOnlyStorage.py
Log Message:
Backport tests of read-only storages.
If tpc_begin() is going to raise ReadOnlyError, the tests need to be
backported, too.
=== Zope/lib/python/ZODB/tests/ReadOnlyStorage.py 1.3 => 1.3.6.1 ===
--- Zope/lib/python/ZODB/tests/ReadOnlyStorage.py:1.3 Wed Aug 14 18:07:09 2002
+++ Zope/lib/python/ZODB/tests/ReadOnlyStorage.py Wed Nov 6 10:49:46 2002
@@ -32,28 +32,16 @@
self.assertRaises(ReadOnlyError, self._storage.new_oid)
self.assertRaises(ReadOnlyError, self._storage.undo,
'\000' * 8)
-
t = Transaction()
- self._storage.tpc_begin(t)
+ self.assertRaises(ReadOnlyError, self._storage.tpc_begin, t)
+
self.assertRaises(ReadOnlyError, self._storage.abortVersion,
'', t)
- self._storage.tpc_abort(t)
-
- t = Transaction()
- self._storage.tpc_begin(t)
self.assertRaises(ReadOnlyError, self._storage.commitVersion,
'', '', t)
- self._storage.tpc_abort(t)
-
- t = Transaction()
- self._storage.tpc_begin(t)
self.assertRaises(ReadOnlyError, self._storage.store,
'\000' * 8, None, '', '', t)
- self._storage.tpc_abort(t)
if self._storage.supportsTransactionalUndo():
- t = Transaction()
- self._storage.tpc_begin(t)
self.assertRaises(ReadOnlyError, self._storage.transactionalUndo,
'\000' * 8, t)
- self._storage.tpc_abort(t)