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
a5830619
Commit
a5830619
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
c2ce4798
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 @
a5830619
...
@@ -328,6 +328,10 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
...
@@ -328,6 +328,10 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
self
.
assertRaises
(
BadRequest
,
om
.
_setObject
,
'111'
,
si
)
self
.
assertRaises
(
BadRequest
,
om
.
_setObject
,
'111'
,
si
)
self
.
assertRaises
(
BadRequest
,
om
.
_setObject
,
'REQUEST'
,
si
)
self
.
assertRaises
(
BadRequest
,
om
.
_setObject
,
'REQUEST'
,
si
)
self
.
assertRaises
(
BadRequest
,
om
.
_setObject
,
'/'
,
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
):
def
test_getsetitem
(
self
):
om
=
self
.
_makeOne
()
om
=
self
.
_makeOne
()
...
@@ -386,7 +390,6 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
...
@@ -386,7 +390,6 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
def
test_get
(
self
):
def
test_get
(
self
):
om
=
self
.
_makeOne
()
om
=
self
.
_makeOne
()
si1
=
SimpleItem
(
'1'
)
si1
=
SimpleItem
(
'1'
)
self
.
assertRaises
(
BadRequest
,
om
.
__setitem__
,
'get'
,
si1
)
om
[
'1'
]
=
si1
om
[
'1'
]
=
si1
self
.
failUnless
(
om
.
get
(
'1'
)
==
si1
)
self
.
failUnless
(
om
.
get
(
'1'
)
==
si1
)
# A contained item overwrites the method
# A contained item overwrites the method
...
@@ -401,7 +404,6 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
...
@@ -401,7 +404,6 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
def
test_items
(
self
):
def
test_items
(
self
):
om
=
self
.
_makeOne
()
om
=
self
.
_makeOne
()
si1
=
SimpleItem
(
'1'
)
si1
=
SimpleItem
(
'1'
)
self
.
assertRaises
(
BadRequest
,
om
.
__setitem__
,
'items'
,
si1
)
om
[
'1'
]
=
si1
om
[
'1'
]
=
si1
self
.
failUnless
((
'1'
,
si1
)
in
om
.
items
())
self
.
failUnless
((
'1'
,
si1
)
in
om
.
items
())
# A contained item overwrites the method
# A contained item overwrites the method
...
@@ -416,7 +418,6 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
...
@@ -416,7 +418,6 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
def
test_keys
(
self
):
def
test_keys
(
self
):
om
=
self
.
_makeOne
()
om
=
self
.
_makeOne
()
si1
=
SimpleItem
(
'1'
)
si1
=
SimpleItem
(
'1'
)
self
.
assertRaises
(
BadRequest
,
om
.
__setitem__
,
'keys'
,
si1
)
om
[
'1'
]
=
si1
om
[
'1'
]
=
si1
self
.
failUnless
(
'1'
in
om
.
keys
())
self
.
failUnless
(
'1'
in
om
.
keys
())
# A contained item overwrites the method
# A contained item overwrites the method
...
@@ -431,7 +432,6 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
...
@@ -431,7 +432,6 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
def
test_values
(
self
):
def
test_values
(
self
):
om
=
self
.
_makeOne
()
om
=
self
.
_makeOne
()
si1
=
SimpleItem
(
'1'
)
si1
=
SimpleItem
(
'1'
)
self
.
assertRaises
(
BadRequest
,
om
.
__setitem__
,
'values'
,
si1
)
om
[
'1'
]
=
si1
om
[
'1'
]
=
si1
self
.
failUnless
(
si1
in
om
.
values
())
self
.
failUnless
(
si1
in
om
.
values
())
# A contained item overwrites the method
# 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