[Checkins] SVN: ZODB/trunk/src/ZODB/tests/BasicStorage.py Fixed some invalid values passed to store that are now neing checked

Jim Fulton jim at zope.com
Sat Oct 25 20:36:13 EDT 2008


Log message for revision 92556:
  Fixed some invalid values passed to store that are now neing checked
  by mapping storage.
  
  Removed an invalid test.  Multible arguments should be passed to
  tpc_begin only for recoverable storages.
  

Changed:
  U   ZODB/trunk/src/ZODB/tests/BasicStorage.py

-=-
Modified: ZODB/trunk/src/ZODB/tests/BasicStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/tests/BasicStorage.py	2008-10-26 00:36:10 UTC (rev 92555)
+++ ZODB/trunk/src/ZODB/tests/BasicStorage.py	2008-10-26 00:36:12 UTC (rev 92556)
@@ -44,12 +44,12 @@
         self.assertRaises(
             POSException.StorageTransactionError,
             self._storage.store,
-            0, 0, 0, 0, transaction.Transaction())
+            ZERO, ZERO, '', '', transaction.Transaction())
 
         self.assertRaises(
             POSException.StorageTransactionError,
             self._storage.store,
-            0, 1, 2, '', transaction.Transaction())
+            ZERO, 1, 2, '', transaction.Transaction())
         self._storage.tpc_abort(t)
 
     def checkSerialIsNoneForInitialRevision(self):
@@ -153,17 +153,6 @@
         revid2 = self._dostore(oid, revid=revid1, data=p42)
         eq(revid2, self._storage.getTid(oid))
 
-    def checkTwoArgBegin(self):
-        # Unsure: how standard is three-argument tpc_begin()?
-        t = transaction.Transaction()
-        tid = '\0\0\0\0\0psu'
-        self._storage.tpc_begin(t, tid)
-        oid = self._storage.new_oid()
-        data = zodb_pickle(MinPO(8))
-        self._storage.store(oid, None, data, '', t)
-        self._storage.tpc_vote(t)
-        self._storage.tpc_finish(t)
-
     def checkLen(self):
         # len(storage) reports the number of objects.
         # check it is zero when empty



More information about the Checkins mailing list