[Zodb-checkins]
SVN: ZODB/branches/ctheune-blobsupport/src/ZODB/Blobs/tests/transaction.txt
Add a test for attempting to persist blobfile objects.
Chris McDonough
chrism at plope.com
Fri Mar 25 09:47:46 EST 2005
Log message for revision 29683:
Add a test for attempting to persist blobfile objects.
Changed:
U ZODB/branches/ctheune-blobsupport/src/ZODB/Blobs/tests/transaction.txt
-=-
Modified: ZODB/branches/ctheune-blobsupport/src/ZODB/Blobs/tests/transaction.txt
===================================================================
--- ZODB/branches/ctheune-blobsupport/src/ZODB/Blobs/tests/transaction.txt 2005-03-25 14:47:43 UTC (rev 29682)
+++ ZODB/branches/ctheune-blobsupport/src/ZODB/Blobs/tests/transaction.txt 2005-03-25 14:47:44 UTC (rev 29683)
@@ -123,6 +123,17 @@
>>> blob2.open('r').read()
'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
connections should result in a write conflict error (this test is
broken currently because I need to figure out how to commit the
@@ -140,8 +151,6 @@
...
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
anymore:
More information about the Zodb-checkins
mailing list