[Checkins] SVN: Products.CMFDefault/trunk/Products/CMFDefault/browser/content/tests/rss.txt Enable syndication for the folder.
Charlie Clark
cvs-admin at zope.org
Wed Sep 5 10:43:22 UTC 2012
Log message for revision 127702:
Enable syndication for the folder.
Changed:
U Products.CMFDefault/trunk/Products/CMFDefault/browser/content/tests/rss.txt
-=-
Modified: Products.CMFDefault/trunk/Products/CMFDefault/browser/content/tests/rss.txt
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/browser/content/tests/rss.txt 2012-09-04 21:13:11 UTC (rev 127701)
+++ Products.CMFDefault/trunk/Products/CMFDefault/browser/content/tests/rss.txt 2012-09-05 10:43:17 UTC (rev 127702)
@@ -1,12 +1,27 @@
RSS Views
---------------
+---------
-Set up site, content and user.
+Set up site and enable syndication for the portal
>>> from zope.component.hooks import setSite
>>> setSite(app.site)
+ >>> app.site.portal_syndication.enabled
+ False
>>> app.site.portal_syndication.enable()
+ >>> app.site.portal_syndication.enabled
+ True
+Set up syndication for the folder
+
+ >>> from Products.CMFCore.interfaces import ISyndicationInfo
+ >>> from zope.component import getAdapter
+ >>> info = getAdapter(app.site, ISyndicationInfo)
+ >>> info.enabled
+ False
+ >>> info.enable()
+ >>> info.enabled
+ True
+
>>> from Products.CMFDefault.Document import Document
>>> obj_id = app.site._setObject('myDocument', Document('myDocument'))
>>> obj = app.site[obj_id]
@@ -26,3 +41,7 @@
Get RSS Feed
+ >>> browser.open("http://localhost/site/@@rss.xml")
+ >>> browser.contents is not None
+ True
+
More information about the checkins
mailing list