[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/pagelet/README.txt
Change comments in test for a better understading
Roger Ineichen
roger at projekt01.ch
Thu Jan 20 03:52:05 EST 2005
Log message for revision 28882:
Change comments in test for a better understading
Remove unused test code
Changed:
U Zope3/trunk/src/zope/app/pagelet/README.txt
-=-
Modified: Zope3/trunk/src/zope/app/pagelet/README.txt
===================================================================
--- Zope3/trunk/src/zope/app/pagelet/README.txt 2005-01-20 00:33:00 UTC (rev 28881)
+++ Zope3/trunk/src/zope/app/pagelet/README.txt 2005-01-20 08:52:05 UTC (rev 28882)
@@ -184,16 +184,9 @@
weight="0"
/>
- >>> name = 'testpagelet'
- >>> layer = IBrowserRequest
- >>> slot = IPageletSlot
- >>> template = u'src/zope/app/pagelet/tests/testfiles/test_pagelet.pt'
- >>> for_ = Interface
- >>> permission = 'zope.View'
- >>> weight = 0
+Setup a test pagelet:
-Register the pagelet:
-
+ >>> name = 'testpagelet'
>>> pagelet_factory = TestPagelet
>>> defineChecker(pagelet_factory, testChecker)
>>> adaptersrv.register(
@@ -220,7 +213,11 @@
>>> path = os.path.join(os.path.dirname(__file__), 'tests', 'testfiles')
>>> index = ViewPageTemplateFile('index_pagelets.pt', path)
-Call the 'index' (view) on the browser view instance:
+Call the 'index' (view) on the browser view instance the sample pagelet
+'index_pagelets.pt' calls pagelets registred for the slot
+'zope.app.pagelet.interfaces.IPageletSlot'. We registred the
+'test_pagelet' for this slot in the TestPagelet class. For more info
+take a look at the index_pagelets.pt' file in the tests/testfiles folder:
>>> html = index(view, request)
More information about the Zope3-Checkins
mailing list