|
|
Choosing A Webhost: |
CVS: Products/CMFDefault/tests - test_Discussions.py:1.19.6.2: msg#00007web.zope.cmf.cvs
Update of /cvs-repository/Products/CMFDefault/tests In directory cvs.zope.org:/tmp/cvs-serv25712/CMFDefault/tests Modified Files: Tag: CMF-1_5-branch test_Discussions.py Log Message: Make sure getDiscussionFor returns acquisition-wrapped talkback objects. === Products/CMFDefault/tests/test_Discussions.py 1.19.6.1 => 1.19.6.2 === --- Products/CMFDefault/tests/test_Discussions.py:1.19.6.1 Fri Sep 3 13:04:36 2004 +++ Products/CMFDefault/tests/test_Discussions.py Mon Jan 17 19:45:27 2005 @@ -4,6 +4,7 @@ Zope.startup() from Interface.Verify import verifyClass +from Products.CMFCore.utils import getToolByName from Products.CMFCore.CatalogTool import CatalogTool from Products.CMFCore.tests.base.dummy import DummyContent from Products.CMFCore.tests.base.dummy import DummySite @@ -246,6 +247,25 @@ talkback1 = dtool.getDiscussionFor(reply1) self.assertEqual(len(talkback.getReplies()), 1) self.assertEqual(len(talkback1.getReplies()), 0) + + def test_newTalkbackIsWrapped(self): + test = self._makeDummyContent('test') + test.allow_discussion = 1 + dtool = self.site.portal_discussion + talkback = dtool.getDiscussionFor(test) + self.failUnless(hasattr(talkback, 'aq_base')) + # Acquire a portal tool + self.failUnless(getToolByName(talkback, 'portal_discussion')) + + def test_existingTalkbackIsWrapped(self): + test = self._makeDummyContent('test') + test.allow_discussion = 1 + dtool = self.site.portal_discussion + talkback = dtool.getDiscussionFor(test) + talkback = dtool.getDiscussionFor(test) + self.failUnless(hasattr(talkback, 'aq_base')) + # Acquire a portal tool + self.failUnless(getToolByName(talkback, 'portal_discussion')) def test_suite():
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | CVS: CMF - CHANGES.txt:1.248.2.55, Stefan H. Holek |
|---|---|
| Next by Date: | CVS: Products/CMFDefault - DiscussionTool.py:1.21.2.1, Stefan H. Holek |
| Previous by Thread: | CVS: CMF - CHANGES.txt:1.248.2.55, Stefan H. Holek |
| Next by Thread: | CVS: Products/CMFDefault - DiscussionTool.py:1.21.2.1, Stefan H. Holek |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |