Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Kirill Smelkov
Zope
Commits
1ea87abc
Commit
1ea87abc
authored
Feb 09, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test non-replacement of methods with other '_setObject' assertions.
parent
3c04c425
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/OFS/tests/testObjectManager.py
src/OFS/tests/testObjectManager.py
+4
-4
No files found.
src/OFS/tests/testObjectManager.py
View file @
1ea87abc
...
...
@@ -353,6 +353,10 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
self
.
assertRaises
(
BadRequest
,
om
.
_setObject
,
'111'
,
si
)
self
.
assertRaises
(
BadRequest
,
om
.
_setObject
,
'REQUEST'
,
si
)
self
.
assertRaises
(
BadRequest
,
om
.
_setObject
,
'/'
,
si
)
self
.
assertRaises
(
BadRequest
,
om
.
_setObject
,
'get'
,
si
)
self
.
assertRaises
(
BadRequest
,
om
.
_setObject
,
'items'
,
si
)
self
.
assertRaises
(
BadRequest
,
om
.
_setObject
,
'keys'
,
si
)
self
.
assertRaises
(
BadRequest
,
om
.
_setObject
,
'values'
,
si
)
def
test_getsetitem
(
self
):
om
=
self
.
_makeOne
()
...
...
@@ -411,7 +415,6 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
def
test_get
(
self
):
om
=
self
.
_makeOne
()
si1
=
SimpleItem
(
'1'
)
self
.
assertRaises
(
BadRequest
,
om
.
__setitem__
,
'get'
,
si1
)
om
[
'1'
]
=
si1
self
.
assertTrue
(
om
.
get
(
'1'
)
==
si1
)
# A contained item overwrites the method
...
...
@@ -426,7 +429,6 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
def
test_items
(
self
):
om
=
self
.
_makeOne
()
si1
=
SimpleItem
(
'1'
)
self
.
assertRaises
(
BadRequest
,
om
.
__setitem__
,
'items'
,
si1
)
om
[
'1'
]
=
si1
self
.
assertTrue
((
'1'
,
si1
)
in
om
.
items
())
# A contained item overwrites the method
...
...
@@ -441,7 +443,6 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
def
test_keys
(
self
):
om
=
self
.
_makeOne
()
si1
=
SimpleItem
(
'1'
)
self
.
assertRaises
(
BadRequest
,
om
.
__setitem__
,
'keys'
,
si1
)
om
[
'1'
]
=
si1
self
.
assertTrue
(
'1'
in
om
.
keys
())
# A contained item overwrites the method
...
...
@@ -456,7 +457,6 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
def
test_values
(
self
):
om
=
self
.
_makeOne
()
si1
=
SimpleItem
(
'1'
)
self
.
assertRaises
(
BadRequest
,
om
.
__setitem__
,
'values'
,
si1
)
om
[
'1'
]
=
si1
self
.
assertTrue
(
si1
in
om
.
values
())
# A contained item overwrites the method
...
...
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