source: trunk/tests/testCustomization.py @ 47

Revision 47, 1.8 KB checked in by tarmo, 14 years ago (diff)

Converted all line feeds to LF and added the svn:eol-style
property to keep the line feeds in LF. When adding new text files,
run the command "svn propset svn:eol-style LF [FILE]" to set the
property.

  • Property svn:eol-style set to LF
Line 
1import os, sys, re
2if __name__ == '__main__':
3    execfile(os.path.join(sys.path[0], 'framework.py'))
4
5from Testing import ZopeTestCase
6from ToolboxTestCase import ToolboxTestCase
7from Testing.ZopeTestCase.functional import Functional
8
9from Products.Toolbox.config import *
10
11class TestCustomization(ToolboxTestCase,Functional):
12    """
13    Test suite for verifying customization policy.
14    """
15
16    def testSkinExistence(self):
17        self.failUnless(SKIN_NAME in self.portal.portal_skins.getSkinSelections(),"Our skin '%s' not found" % SKIN_NAME)
18
19    def testSyndication(self):
20        self.failUnless(self.portal.portal_syndication.isAllowed,"Syndication isn't turned on.")
21
22    def testPortletLayout(self):
23        for entry in self.portal.right_slots:
24            self.failIf('calendar' in entry,'Calendar portlet is still visible')
25        for entry in self.portal.left_slots:
26            self.failIf('recent' in entry,'Recent changes portlet is still visible: %s' % str(self.portal.left_slots))
27
28    def testNoNavTree(self):
29        for entry in self.portal.left_slots:
30            self.failIf('navigation' in entry,'Navigation portlet is still visible')
31        for entry in self.portal.right_slots:
32            self.failIf('navigation' in entry,'Navigation portlet is still visible')
33
34    def testTopTabs(self):
35        for action in self.portal.portal_actions._actions:
36            if action.getCategory()=='portal_tabs' and action.getVisibility()==True:
37                self.failUnless(action.Title() in SECTIONS,
38                                'Visible tabs found that are not in SECTIONS: %s' % action.Title())
39
40def test_suite():
41    from unittest import TestSuite, makeSuite
42    suite = TestSuite()
43    suite.addTest(makeSuite(TestCustomization))
44    return suite
45
46if __name__ == '__main__':
47    framework()
Note: See TracBrowser for help on using the repository browser.