source: trunk/tests/testSyndicatedFolder.py @ 66

Revision 66, 1.0 KB checked in by tarmo, 14 years ago (diff)

Changed the svn:eol-style property to "native", since
people aren't using unix line feeds uniformally.

  • Property svn:eol-style set to native
Line 
1#
2# Test case for SyndicatedFolder content
3#
4
5import os, sys
6if __name__ == '__main__':
7    execfile(os.path.join(sys.path[0], 'framework.py'))
8
9from Testing import ZopeTestCase
10from ToolboxTestCase import ToolboxTestCase
11from Products.CMFCore.utils import getToolByName
12
13types = ('SyndicatedFolder',)
14
15class TestSyndicatedFolder(ToolboxTestCase):
16
17    def afterSetUp(self):
18        pass
19
20    def testExistence(self):
21        for pt in types:
22            ob = self.construct(pt,pt,self.folder)
23            self.failUnlessEqual(ob._getPortalTypeName(),pt)
24            self.failUnlessEqual(ob.portal_type,pt)
25
26    def testSyndication(self):
27        ob=self.construct('SyndicatedFolder', 'TestSyndicatedFolder' ,self.folder)
28        syn_tool = self.portal.portal_syndication
29        self.failUnless(syn_tool.isSyndicationAllowed(ob));
30       
31def test_suite():
32    from unittest import TestSuite, makeSuite
33    suite = TestSuite()
34    suite.addTest(makeSuite(TestSyndicatedFolder))
35    return suite
36
37if __name__ == '__main__':
38    framework()
Note: See TracBrowser for help on using the repository browser.