[Zodb-checkins] SVN: ZODB/trunk/src/ZODB/tests/blob_basic.txt Added test for not opening blobs that are already opened for writing.

Jim Fulton jim at zope.com
Thu Jun 7 05:08:38 EDT 2007


Log message for revision 76447:
  Added test for not opening blobs that are already opened for writing.
  

Changed:
  U   ZODB/trunk/src/ZODB/tests/blob_basic.txt

-=-
Modified: ZODB/trunk/src/ZODB/tests/blob_basic.txt
===================================================================
--- ZODB/trunk/src/ZODB/tests/blob_basic.txt	2007-06-07 09:08:33 UTC (rev 76446)
+++ ZODB/trunk/src/ZODB/tests/blob_basic.txt	2007-06-07 09:08:38 UTC (rev 76447)
@@ -78,6 +78,19 @@
 
     >>> f4 = myblob.open("a")
     >>> f4.write("\nBlob is fine.")
+
+We can't open a blob while it is open for writing:
+
+    >>> myblob.open("w")
+    Traceback (most recent call last):
+    ...
+    BlobError: Already opened for writing.
+
+    >>> myblob.open("r")
+    Traceback (most recent call last):
+    ...
+    BlobError: Already opened for writing.
+
     >>> f4.close()
 
 Now we can read it:



More information about the Zodb-checkins mailing list