[Zodb-checkins] CVS: Zope3/src/ZODB/tests - testZODB.py:1.24.2.3

Jeremy Hylton jeremy at zope.com
Mon Mar 29 13:44:31 EST 2004


Update of /cvs-repository/Zope3/src/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv31568/src/ZODB/tests

Modified Files:
      Tag: jeremy-txn-branch
	testZODB.py 
Log Message:
Remove dup_name argument.  The name doesn't matter.


=== Zope3/src/ZODB/tests/testZODB.py 1.24.2.2 => 1.24.2.3 ===
--- Zope3/src/ZODB/tests/testZODB.py:1.24.2.2	Mon Mar 29 12:14:09 2004
+++ Zope3/src/ZODB/tests/testZODB.py	Mon Mar 29 13:44:28 2004
@@ -54,20 +54,20 @@
         self._db.close()
         self._storage.cleanup()
 
-    def checkExportImport(self, abort_it=False, dup_name='test_duplicate'):
+    def checkExportImport(self, abort_it=False):
         self.populate()
         conn = self._db.open()
         try:
-            self.duplicate(conn, dup_name, abort_it)
+            self.duplicate(conn, abort_it)
         finally:
             conn.close()
         conn = self._db.open()
         try:
-            self.verify(conn, dup_name, abort_it)
+            self.verify(conn, abort_it)
         finally:
             conn.close()
 
-    def duplicate(self, conn, dup_name, abort_it):
+    def duplicate(self, conn, abort_it):
         get_transaction().begin()
         get_transaction().note('duplication')
         root = conn.root()
@@ -81,7 +81,7 @@
             f.seek(0)
             new_ob = ob._p_jar.importFile(f)
             self.assertEqual(new_ob, ob)
-            root[dup_name] = new_ob
+            root['dup'] = new_ob
             f.close()
             if abort_it:
                 get_transaction().abort()
@@ -91,12 +91,12 @@
             get_transaction().abort()
             raise
 
-    def verify(self, conn, dup_name, abort_it):
+    def verify(self, conn, abort_it):
         get_transaction().begin()
         root = conn.root()
         ob = root['test']
         try:
-            ob2 = root[dup_name]
+            ob2 = root['dup']
         except KeyError:
             if abort_it:
                 # Passed the test.
@@ -123,7 +123,7 @@
         get_transaction().commit()
 
     def checkExportImportAborted(self):
-        self.checkExportImport(abort_it=1, dup_name='test_duplicate_aborted')
+        self.checkExportImport(abort_it=True)
 
     def checkVersionOnly(self):
         # Make sure the changes to make empty transactions a no-op




More information about the Zodb-checkins mailing list