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
Show 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',):
...
@@ -218,11 +218,9 @@ so we get ('',) instead of ('eagle',):
>>> getattr(view, '__ac_permissions__')
>>> getattr(view, '__ac_permissions__')
(('View management screens', ('',)),)
(('View management screens', ('',)),)
Wrap into an acquisition so that imPermissionRole objects can be
The view's __roles__ attribute can be evaluated correctly:
evaluated. __roles__ is a imPermissionRole object:
>>> view_roles = getattr(view, '__roles__', None)
>>> view.__roles__
>>> view_roles
('Manager',)
('Manager',)
Check to see if view's context properly acquires its true
Check to see if view's context properly acquires its true
...
@@ -237,13 +235,14 @@ Check the wrapper type
...
@@ -237,13 +235,14 @@ Check the wrapper type
>>> type(context) == ImplicitAcquisitionWrapper
>>> type(context) == ImplicitAcquisitionWrapper
True
True
The acquired parent is the view. This isn't
The parent of the view is the view's context:
usually what you want.
>>> aq_parent(context) == view
>>> view.__parent__ == view.context
True
>>> aq_parent(view) == view.context
True
True
T
o get what you usually want, do this
T
he direct parent of the context is
>>> context.aq_inner.aq_parent
>>> context.aq_inner.aq_parent
<Folder at /test_folder_1_>
<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