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 -----------------------------------------
|
2011-02-17 11:13:42 -06:00
|
|
|
ZopeTestCase.installProduct('PloneLanguageTool')
|
2011-10-19 02:37:44 -05:00
|
|
|
ZopeTestCase.installProduct('<!applicationName!>')
|
|
|
|
PloneTestCase.setupPloneSite(products=['PloneLanguageTool',
|
|
|
|
'<!applicationName!>'])
|
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])
|
|
|
|
# ------------------------------------------------------------------------------
|