Commit 1ee3df83 authored by Jeremy Hylton's avatar Jeremy Hylton

Mixin PersistentStorage.

Also, add an open() method to open the storage.  Used by
PersistentStorage, too.
parent 28432475
...@@ -5,7 +5,7 @@ from ZODB.tests import StorageTestBase, BasicStorage, \ ...@@ -5,7 +5,7 @@ from ZODB.tests import StorageTestBase, BasicStorage, \
TransactionalUndoStorage, VersionStorage, \ TransactionalUndoStorage, VersionStorage, \
TransactionalUndoVersionStorage, PackableStorage, \ TransactionalUndoVersionStorage, PackableStorage, \
Synchronization, ConflictResolution, HistoryStorage, \ Synchronization, ConflictResolution, HistoryStorage, \
IteratorStorage, Corruption, RevisionStorage IteratorStorage, Corruption, RevisionStorage, PersistentStorage
class FileStorageTests( class FileStorageTests(
StorageTestBase.StorageTestBase, StorageTestBase.StorageTestBase,
...@@ -18,12 +18,20 @@ class FileStorageTests( ...@@ -18,12 +18,20 @@ class FileStorageTests(
Synchronization.SynchronizedStorage, Synchronization.SynchronizedStorage,
ConflictResolution.ConflictResolvingStorage, ConflictResolution.ConflictResolvingStorage,
HistoryStorage.HistoryStorage, 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): def setUp(self):
self._storage = ZODB.FileStorage.FileStorage( self.open(create=1)
'FileStorageTests.fs', create=1)
StorageTestBase.StorageTestBase.setUp(self) StorageTestBase.StorageTestBase.setUp(self)
def tearDown(self): def tearDown(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment