source: products/SimpleBlog/trunk/tests/SimpleBlogTC.py

Last change on this file was 1, checked in by myroslav, 18 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 1.9 KB
Line 
1# Define a common SimpleBlogTestCase base class for use in all
2# SimpleBlog tests
3
4# Import the base test case classes
5from Testing import ZopeTestCase
6from Products.PloneTestCase import PloneTestCase
7
8# Make ZopeTestCase aware of the standard products
9
10# These install (or fail) quietly
11ZopeTestCase.installProduct('CMFCore', quiet=1)
12ZopeTestCase.installProduct('CMFDefault', quiet=1)
13ZopeTestCase.installProduct('CMFCalendar', quiet=1)
14ZopeTestCase.installProduct('CMFTopic', quiet=1)
15ZopeTestCase.installProduct('DCWorkflow', quiet=1)
16ZopeTestCase.installProduct('CMFHelpIcons', quiet=1)
17ZopeTestCase.installProduct('CMFQuickInstallerTool', quiet=1)
18ZopeTestCase.installProduct('CMFFormController', quiet=1)
19ZopeTestCase.installProduct('GroupUserFolder', quiet=1)
20ZopeTestCase.installProduct('ZCTextIndex', quiet=1)
21ZopeTestCase.installProduct('TextIndexNG2', quiet=1)
22ZopeTestCase.installProduct('SecureMailHost', quiet=1)
23ZopeTestCase.installProduct('CMFPlone')
24ZopeTestCase.installProduct('Archetypes')
25ZopeTestCase.installProduct('PortalTransforms', quiet=1)
26ZopeTestCase.installProduct('MimetypesRegistry', quiet=1)
27ZopeTestCase.installProduct('kupu', quiet=1)
28
29#These must install cleanly
30ZopeTestCase.installProduct('SimpleBlog')
31
32# Set up the Plone site used for the test fixture. The PRODUCTS are the products
33# to install in the Plone site (as opposed to the products defined above, which
34# are all products available to Zope in the test fixture)
35PRODUCTS = ['SimpleBlog']
36PloneTestCase.setupPloneSite(products=PRODUCTS)
37
38
39class SimpleBlogTestCase(PloneTestCase.PloneTestCase):
40
41    class Session(dict):
42        def set(self, key, value):
43            self[key] = value
44
45    def _setup(self):
46        PloneTestCase.PloneTestCase._setup(self)
47        self.app.REQUEST['SESSION'] = self.Session()
48
49    # You may wish to define additional helper methods
50    # here that will be available in all tests.
Note: See TracBrowser for help on using the repository browser.