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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
ZODB
Commits
df2ebe37
Commit
df2ebe37
authored
Jun 17, 2016
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert load calls to load_current
parent
3c5bbe7b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
src/ZODB/tests/RecoveryStorage.py
src/ZODB/tests/RecoveryStorage.py
+2
-2
src/ZODB/tests/TransactionalUndoStorage.py
src/ZODB/tests/TransactionalUndoStorage.py
+2
-3
No files found.
src/ZODB/tests/RecoveryStorage.py
View file @
df2ebe37
...
@@ -91,8 +91,8 @@ class RecoveryStorage(IteratorDeepCompare):
...
@@ -91,8 +91,8 @@ class RecoveryStorage(IteratorDeepCompare):
# And check to see that the root object exists, but not the other
# And check to see that the root object exists, but not the other
# objects.
# objects.
data
,
serial
=
load_current
(
self
.
_dst
,
root
.
_p_oid
)
data
,
serial
=
load_current
(
self
.
_dst
,
root
.
_p_oid
)
raises
(
KeyError
,
self
.
_dst
.
load
,
obj1
.
_p_oid
,
''
)
raises
(
KeyError
,
load_current
,
self
.
_dst
,
obj1
.
_p_oid
)
raises
(
KeyError
,
self
.
_dst
.
load
,
obj2
.
_p_oid
,
''
)
raises
(
KeyError
,
load_current
,
self
.
_dst
,
obj2
.
_p_oid
)
def
checkRestoreWithMultipleObjectsInUndoRedo
(
self
):
def
checkRestoreWithMultipleObjectsInUndoRedo
(
self
):
from
ZODB.FileStorage
import
FileStorage
from
ZODB.FileStorage
import
FileStorage
...
...
src/ZODB/tests/TransactionalUndoStorage.py
View file @
df2ebe37
...
@@ -138,8 +138,7 @@ class TransactionalUndoStorage:
...
@@ -138,8 +138,7 @@ class TransactionalUndoStorage:
info
=
self
.
_storage
.
undoInfo
()
info
=
self
.
_storage
.
undoInfo
()
self
.
_undo
(
info
[
4
][
"id"
],
[
oid
],
note
=
"undo3"
)
self
.
_undo
(
info
[
4
][
"id"
],
[
oid
],
note
=
"undo3"
)
# This should fail since we've undone the object's creation
# This should fail since we've undone the object's creation
self
.
assertRaises
(
KeyError
,
self
.
assertRaises
(
KeyError
,
load_current
,
self
.
_storage
,
oid
)
self
.
_storage
.
load
,
oid
,
''
)
# And now let's try to redo the object's creation
# And now let's try to redo the object's creation
info
=
self
.
_storage
.
undoInfo
()
info
=
self
.
_storage
.
undoInfo
()
...
@@ -178,7 +177,7 @@ class TransactionalUndoStorage:
...
@@ -178,7 +177,7 @@ class TransactionalUndoStorage:
# creation. Let's undo the object creation.
# creation. Let's undo the object creation.
info
=
self
.
_storage
.
undoInfo
()
info
=
self
.
_storage
.
undoInfo
()
self
.
_undo
(
info
[
2
][
'id'
],
[
oid
])
self
.
_undo
(
info
[
2
][
'id'
],
[
oid
])
self
.
assertRaises
(
KeyError
,
self
.
_storage
.
load
,
oid
,
''
)
self
.
assertRaises
(
KeyError
,
load_current
,
self
.
_storage
,
oid
)
# Loading current data via loadBefore should raise a POSKeyError too:
# Loading current data via loadBefore should raise a POSKeyError too:
self
.
assertRaises
(
KeyError
,
self
.
_storage
.
loadBefore
,
oid
,
self
.
assertRaises
(
KeyError
,
self
.
_storage
.
loadBefore
,
oid
,
...
...
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