[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/test_pages.py Rip out test that tested the bogus behaviour of having "self.context" (where

Philipp von Weitershausen philikon at philikon.de
Fri Jul 27 19:14:34 EDT 2007


Log message for revision 78399:
  Rip out test that tested the bogus behaviour of having "self.context" (where
  'self' is a view) have an aq_chain that includes the view again.
  
  Naturally, this branch is all about ripping this out.
  

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

-=-
Modified: Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/test_pages.py
===================================================================
--- Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/test_pages.py	2007-07-27 23:12:13 UTC (rev 78398)
+++ Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/test_pages.py	2007-07-27 23:14:33 UTC (rev 78399)
@@ -19,47 +19,6 @@
 if __name__ == '__main__':
     execfile(os.path.join(sys.path[0], 'framework.py'))
 
-def test_ViewAcquisitionWrapping():
-    """
-      >>> import Products.Five.browser.tests
-      >>> from Products.Five import zcml
-      >>> zcml.load_config("configure.zcml", Products.Five)
-      >>> zcml.load_config('pages.zcml', package=Products.Five.browser.tests)
-
-      >>> from Products.Five.tests.testing import simplecontent as sc
-      >>> sc.manage_addSimpleContent(self.folder, 'testoid', 'Testoid')
-      >>> uf = self.folder.acl_users
-      >>> uf._doAddUser('manager', 'r00t', ['Manager'], [])
-      >>> self.login('manager')
-
-      >>> view = self.folder.unrestrictedTraverse('testoid/eagle.txt')
-      >>> view is not None
-      True
-      >>> from Products.Five.browser.tests.pages import SimpleView
-      >>> isinstance(view, SimpleView)
-      True
-      >>> view()
-      u'The eagle has landed'
-
-    This sucks, but we know it
-
-      >>> from Acquisition import aq_parent, aq_base
-      >>> aq_parent(view.context) is view
-      True
-
-    This is the right way to get the context parent
-
-      >>> view.context.aq_inner.aq_parent is not view
-      True
-      >>> view.context.aq_inner.aq_parent is self.folder
-      True
-
-    Clean up:
-
-      >>> from zope.app.testing.placelesssetup import tearDown
-      >>> tearDown()
-    """
-
 def test_view_with_unwrapped_context():
     """
     It may be desirable when writing tests for views themselves to



More information about the Zope-Checkins mailing list