[Zodb-checkins] CVS: StandaloneZODB/ZODB/tests - testFileStorage.py:1.12

Jeremy Hylton jeremy@zope.com
Fri, 5 Oct 2001 13:45:10 -0400


Update of /cvs-repository/StandaloneZODB/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv10648

Modified Files:
	testFileStorage.py 
Log Message:
Mixin PersistentStorage.

Also, add an open() method to open the storage.  Used by
PersistentStorage, too.




=== StandaloneZODB/ZODB/tests/testFileStorage.py 1.11 => 1.12 ===
      TransactionalUndoVersionStorage, PackableStorage, \
      Synchronization, ConflictResolution, HistoryStorage, \
-     IteratorStorage, Corruption, RevisionStorage
+     IteratorStorage, Corruption, RevisionStorage, PersistentStorage
 
 class FileStorageTests(
     StorageTestBase.StorageTestBase,
@@ -18,12 +18,20 @@
     Synchronization.SynchronizedStorage,
     ConflictResolution.ConflictResolvingStorage,
     HistoryStorage.HistoryStorage,
-    IteratorStorage.IteratorStorage
+    IteratorStorage.IteratorStorage,
+    PersistentStorage.PersistentStorage,
     ):
 
+    def open(self, **kwargs):
+        if kwargs:
+            self._storage = apply(ZODB.FileStorage.FileStorage,
+                                  ('FileStorageTests.fs',), kwargs)
+        else:
+            self._storage = ZODB.FileStorage.FileStorage(
+                'FileStorageTests.fs', **kwargs)
+
     def setUp(self):
-        self._storage = ZODB.FileStorage.FileStorage(
-            'FileStorageTests.fs', create=1)
+        self.open(create=1)
         StorageTestBase.StorageTestBase.setUp(self)
 
     def tearDown(self):