[Zodb-checkins] CVS: ZODB4/src/zodb/storage/tests - readonly.py:1.3
Barry Warsaw
barry@wooz.org
Wed, 22 Jan 2003 15:25:54 -0500
Update of /cvs-repository/ZODB4/src/zodb/storage/tests
In directory cvs.zope.org:/tmp/cvs-serv20004
Modified Files:
readonly.py
Log Message:
minor cleanups
=== ZODB4/src/zodb/storage/tests/readonly.py 1.2 => 1.3 ===
--- ZODB4/src/zodb/storage/tests/readonly.py:1.2 Wed Dec 25 09:12:20 2002
+++ ZODB4/src/zodb/storage/tests/readonly.py Wed Jan 22 15:25:51 2003
@@ -1,6 +1,6 @@
##############################################################################
#
-# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# Copyright (c) 2001 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
@@ -11,11 +11,12 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
+
+from zodb.storage.base import ZERO
from zodb.interfaces import ReadOnlyError
from zodb.ztransaction import Transaction
class ReadOnlyStorage:
-
def _create_data(self):
# test a read-only storage that already has some data
self.oids = {}
@@ -26,7 +27,7 @@
def _make_readonly(self):
self._storage.close()
- self.open(read_only=1)
+ self.open(read_only=True)
self.assert_(self._storage.isReadOnly())
def checkReadMethods(self):
@@ -45,14 +46,13 @@
t = Transaction()
self.assertRaises(ReadOnlyError, self._storage.new_oid)
self.assertRaises(ReadOnlyError, self._storage.tpc_begin, t)
-
self.assertRaises(ReadOnlyError, self._storage.abortVersion,
'', t)
self.assertRaises(ReadOnlyError, self._storage.commitVersion,
'', '', t)
self.assertRaises(ReadOnlyError, self._storage.store,
- '\000' * 8, None, '', '', t)
+ ZERO, None, '', '', t)
if self._storage.supportsTransactionalUndo():
self.assertRaises(ReadOnlyError, self._storage.transactionalUndo,
- '\000' * 8, t)
+ ZERO, t)