2009-11-11 13:22:13 -06:00
|
|
|
<!codeHeader!>
|
|
|
|
|
|
|
|
from unittest import TestSuite
|
|
|
|
from Testing import ZopeTestCase
|
|
|
|
from Testing.ZopeTestCase import ZopeDocTestSuite
|
|
|
|
from Products.PloneTestCase import PloneTestCase
|
|
|
|
from appy.gen.plone25.mixins.TestMixin import TestMixin, beforeTest, afterTest
|
|
|
|
<!imports!>
|
|
|
|
|
|
|
|
# Initialize Zope & Plone test systems -----------------------------------------
|
|
|
|
ZopeTestCase.installProduct('<!applicationName!>')
|
2011-02-17 11:13:42 -06:00
|
|
|
ZopeTestCase.installProduct('PloneLanguageTool')
|
|
|
|
PloneTestCase.setupPloneSite(products=['<!applicationName!>',
|
|
|
|
'PloneLanguageTool'])
|
2009-11-11 13:22:13 -06:00
|
|
|
|
|
|
|
class Test(PloneTestCase.PloneTestCase, TestMixin):
|
|
|
|
'''Base test class for <!applicationName!> test cases.'''
|
|
|
|
|
|
|
|
# Data needed for defining the tests -------------------------------------------
|
|
|
|
data = {'test_class': Test, 'setUp': beforeTest, 'tearDown': afterTest,
|
|
|
|
'globs': {'appName': '<!applicationName!>'}}
|
|
|
|
modulesWithTests = [<!modulesWithTests!>]
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
def test_suite():
|
|
|
|
return TestSuite([ZopeDocTestSuite(m, **data) for m in modulesWithTests])
|
|
|
|
# ------------------------------------------------------------------------------
|