[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/pages.txt Sanitize test. The __roles__ part is still failing, but I have an idea ; ).

Philipp von Weitershausen philikon at philikon.de
Sat Jul 28 14:25:56 EDT 2007


Log message for revision 78432:
  Sanitize test. The __roles__ part is still failing, but I have an idea ;).
  

Changed:
  U   Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/pages.txt

-=-
Modified: Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/pages.txt
===================================================================
--- Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/pages.txt	2007-07-28 15:52:52 UTC (rev 78431)
+++ Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/pages.txt	2007-07-28 18:25:55 UTC (rev 78432)
@@ -218,11 +218,9 @@
   >>> 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,15 +234,16 @@
   >>> 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_> 
 



More information about the Zope-Checkins mailing list