mς γΈEc@swdZdkZdkZedjo$eeiieiddƒƒnd„Zd„Zedjo e ƒndS(sMTest browser pages $Id: test_pages.py 68331 2006-05-29 09:47:23Z philikon $ Nt__main__is framework.pycCsdS(sΐ >>> 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.simplecontent import manage_addSimpleContent >>> 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() N((((tE/data/zmath/zope/lib/python/Products/Five/browser/tests/test_pages.pyttest_ViewAcquisitionWrappings'cCsudk}dkl}l}dkl}dkl}|dƒ|i|ƒ|dddƒ|dddƒfƒSdS( N(sinstallProductsZopeDocTestSuite(sZopeDocFileSuite(sFunctionalDocFileSuitet PythonScriptss pages.txttpackagesProducts.Five.browser.testsspages_ftest.txt(tunittesttTesting.ZopeTestCasetinstallProducttZopeDocTestSuitetZopeDocFileSuitetFunctionalDocFileSuitet TestSuitetsuite(R R RRR((Rt test_suite?s    !( t__doc__tostsyst__name__texecfiletpathtjoinRR t framework(RRR R((Rt?s $ )