Commit b15400b0 authored by Chris McDonough's avatar Chris McDonough

Add a test for attempting to persist blobfile objects.

parent 99b65e0d
...@@ -123,6 +123,17 @@ blob2 (a different object) should be evident: ...@@ -123,6 +123,17 @@ blob2 (a different object) should be evident:
>>> blob2.open('r').read() >>> blob2.open('r').read()
'this is blob 3' 'this is blob 3'
We shouldn't be able to persist a blob filehandle at commit time
(although the exception which is raised when an object cannot be
pickled appears to be particulary unhelpful for casual users at the
moment):
>>> root1['wontwork'] = blob1.open('r')
>>> transaction.commit()
Traceback (most recent call last):
...
TypeError: coercing to Unicode: need string or buffer, BlobFile found
Attempting to change a blob simultaneously from two different Attempting to change a blob simultaneously from two different
connections should result in a write conflict error (this test is connections should result in a write conflict error (this test is
broken currently because I need to figure out how to commit the broken currently because I need to figure out how to commit the
...@@ -140,8 +151,6 @@ changes made in each connection independently): ...@@ -140,8 +151,6 @@ changes made in each connection independently):
... ...
ConflictError ConflictError
If we modify the same blob in two different connections
While we are testing this, we don't need the storage directory and databases While we are testing this, we don't need the storage directory and databases
anymore: anymore:
......
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