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
e6c90190
Commit
e6c90190
authored
Apr 16, 2009
by
Martin Aspeli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix lame test that broke on Python 2.4
parent
b62e119a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
src/Products/Five/tests/test_security.py
src/Products/Five/tests/test_security.py
+6
-12
No files found.
src/Products/Five/tests/test_security.py
View file @
e6c90190
...
...
@@ -406,12 +406,9 @@ def test_register_permission():
The permission will be made available globally, with default role set
of ('Manager',).
>>> from pprint import pprint
>>> pprint(self.app.rolesOfPermission('Five: Dummy permission'))
[{'name': 'Anonymous', 'selected': ''},
{'name': 'Authenticated', 'selected': ''},
{'name': 'Manager', 'selected': 'SELECTED'},
{'name': 'Owner', 'selected': ''}]
>>> roles = self.app.rolesOfPermission('Five: Dummy permission')
>>> sorted(r['name'] for r in roles if r['selected'])
['Manager']
Let's also ensure that permissions are not overwritten if they exist
already:
...
...
@@ -434,12 +431,9 @@ def test_register_permission():
... '''
>>> zcml.load_string(configure_zcml)
>>> from pprint import pprint
>>> pprint(self.app.rolesOfPermission('Five: Other dummy'))
[{'name': 'Anonymous', 'selected': 'SELECTED'},
{'name': 'Authenticated', 'selected': ''},
{'name': 'Manager', 'selected': ''},
{'name': 'Owner', 'selected': ''}]
>>> roles = self.app.rolesOfPermission('Five: Other dummy')
>>> sorted(r['name'] for r in roles if r['selected'])
['Anonymous']
>>> tearDown()
"""
...
...
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