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
aa22e7a2
Commit
aa22e7a2
authored
Aug 01, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more test cleanup
parent
8cd374c3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
src/Products/ZCatalog/tests/test_zcatalog.py
src/Products/ZCatalog/tests/test_zcatalog.py
+15
-16
No files found.
src/Products/ZCatalog/tests/test_zcatalog.py
View file @
aa22e7a2
...
...
@@ -10,7 +10,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
""" Unittests for
Catalog.
""" Unittests for
ZCatalog
"""
import
unittest
...
...
@@ -61,7 +61,6 @@ class zdummyFalse(zdummy):
def
__nonzero__
(
self
):
return
False
# make objects with failing __len__ and __nonzero__
class
dummyLenFail
(
zdummy
):
...
...
@@ -103,6 +102,20 @@ class fakeparent(Implicit):
return
result
class
PickySecurityManager
:
def
__init__
(
self
,
badnames
=
[]):
self
.
badnames
=
badnames
def
validateValue
(
self
,
value
):
return
1
def
validate
(
self
,
accessed
,
container
,
name
,
value
):
if
name
not
in
self
.
badnames
:
return
1
raise
Unauthorized
(
name
)
class
TestZCatalog
(
unittest
.
TestCase
):
def
setUp
(
self
):
...
...
@@ -228,20 +241,6 @@ class TestZCatalog(unittest.TestCase):
self
.
assertEquals
(
catalog
.
getobject
(
rid0
),
None
)
class
PickySecurityManager
:
def
__init__
(
self
,
badnames
=
[]):
self
.
badnames
=
badnames
def
validateValue
(
self
,
value
):
return
1
def
validate
(
self
,
accessed
,
container
,
name
,
value
):
if
name
not
in
self
.
badnames
:
return
1
raise
Unauthorized
(
name
)
class
TestZCatalogGetObject
(
unittest
.
TestCase
):
# Test what objects are returned by brain.getObject()
...
...
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