Commit 408e93a1 authored by Chris McDonough's avatar Chris McDonough

Run ZEO server tests while backed with a BlobStorage-adapted FileStorage.

Assert that blobs implement IBlob.
parent b15400b0
......@@ -201,7 +201,32 @@ class MappingStorageTests(GenericTests):
def getConfig(self):
return """<mappingstorage 1/>"""
test_classes = [FileStorageTests, MappingStorageTests]
class BlobAdaptedFileStorageTests(GenericTests):
"""ZEO backed by a BlobStorage-adapted FileStorage."""
def setUp(self):
self.blobdir = tempfile.mkdtemp()
super(BlobAdaptedFileStorageTests, self).setUp()
def tearDown(self):
import shutil
shutil.rmtree(self.blobdir)
super(BlobAdaptedFileStorageTests, self).tearDown()
def getConfig(self):
return """
<blobstorage 1>
blob-dir %s
<filestorage 2>
path %s
</filestorage>
</blobstorage>
""" % (self.blobdir, tempfile.mktemp())
def checkStoreBlob(self):
pass
test_classes = [FileStorageTests, MappingStorageTests,
BlobAdaptedFileStorageTests]
def test_suite():
suite = unittest.TestSuite()
......
......@@ -20,6 +20,12 @@ You create a blob like this:
>>> from ZODB.Blobs.Blob import Blob
>>> myblob = Blob()
A blob implements the IBlob interface:
>>> from ZODB.Blobs.interfaces import IBlob
>>> IBlob.providedBy(myblob)
True
Opening a new Blob for reading fails:
>>> myblob.open("r")
......
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