Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
b15400b0
Commit
b15400b0
authored
Mar 25, 2005
by
Chris McDonough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for attempting to persist blobfile objects.
parent
99b65e0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
branches/ctheune-blobsupport/src/ZODB/Blobs/tests/transaction.txt
.../ctheune-blobsupport/src/ZODB/Blobs/tests/transaction.txt
+11
-2
No files found.
branches/ctheune-blobsupport/src/ZODB/Blobs/tests/transaction.txt
View file @
b15400b0
...
@@ -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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment