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
9ca465a5
Commit
9ca465a5
authored
Jul 28, 2007
by
Philipp von Weitershausen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sanitize test. The __roles__ part is still failing, but I have an idea ;).
parent
b32ed0ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
lib/python/Products/Five/browser/tests/pages.txt
lib/python/Products/Five/browser/tests/pages.txt
+9
-10
No files found.
lib/python/Products/Five/browser/tests/pages.txt
View file @
9ca465a5
...
...
@@ -218,11 +218,9 @@ so we get ('',) instead of ('eagle',):
>>> getattr(view, '__ac_permissions__')
(('View management screens', ('',)),)
Wrap into an acquisition so that imPermissionRole objects can be
evaluated. __roles__ is a imPermissionRole object:
The view's __roles__ attribute can be evaluated correctly:
>>> view_roles = getattr(view, '__roles__', None)
>>> view_roles
>>> view.__roles__
('Manager',)
Check to see if view's context properly acquires its true
...
...
@@ -236,14 +234,15 @@ Check the wrapper type
>>> from Acquisition import ImplicitAcquisitionWrapper
>>> type(context) == ImplicitAcquisitionWrapper
True
The acquired parent is the view. This isn't
usually what you want.
>>> aq_parent(context) == view
True
The parent of the view is the view's context:
To get what you usually want, do this
>>> view.__parent__ == view.context
True
>>> aq_parent(view) == view.context
True
The direct parent of the context is
>>> context.aq_inner.aq_parent
<Folder at /test_folder_1_>
...
...
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