Commit 15548c4a authored by Jim Fulton's avatar Jim Fulton

Fixed some typos in some error handling code.

parent 9a7ad8f0
......@@ -167,7 +167,7 @@ class DemoStorage(object):
try:
return self.base.loadBlob(oid, serial)
except AttributeError:
if not zope.interface.IBlobStorage.providBy(self.base):
if not ZODB.interfaces.IBlobStorage.providedBy(self.base):
raise ZODB.POSException.POSKeyError(oid, serial)
raise
except AttributeError:
......@@ -182,7 +182,7 @@ class DemoStorage(object):
try:
return self.base.openCommittedBlobFile(oid, serial, blob)
except AttributeError:
if not zope.interface.IBlobStorage.providBy(self.base):
if not ZODB.interfaces.IBlobStorage.providedBy(self.base):
raise ZODB.POSException.POSKeyError(oid, serial)
raise
except AttributeError:
......
......@@ -156,6 +156,21 @@ def testSomeDelegation():
"""
def blob_pos_key_error_with_non_blob_base():
"""
>>> storage = ZODB.DemoStorage.DemoStorage()
>>> storage.loadBlob(ZODB.utils.p64(1), ZODB.utils.p64(1))
Traceback (most recent call last):
...
POSKeyError: 0x01
>>> storage.openCommittedBlobFile(ZODB.utils.p64(1), ZODB.utils.p64(1))
Traceback (most recent call last):
...
POSKeyError: 0x01
"""
def test_suite():
suite = unittest.TestSuite((
......
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