2009-11-11 13:22:13 -06:00
|
|
|
<!codeHeader!>
|
|
|
|
|
|
|
|
from unittest import TestSuite
|
|
|
|
from Testing import ZopeTestCase
|
|
|
|
from Testing.ZopeTestCase import ZopeDocTestSuite
|
2011-12-05 08:11:29 -06:00
|
|
|
from appy.gen.mixins.TestMixin import TestMixin, beforeTest, afterTest
|
2009-11-11 13:22:13 -06:00
|
|
|
<!imports!>
|
|
|
|
|
2011-12-05 08:11:29 -06:00
|
|
|
# Initialize the Zope test system ----------------------------------------------
|
2011-10-19 02:37:44 -05:00
|
|
|
ZopeTestCase.installProduct('<!applicationName!>')
|
2009-11-11 13:22:13 -06:00
|
|
|
|
2011-12-05 08:11:29 -06:00
|
|
|
class Test(ZopeTestCase.ZopeTestCase, TestMixin):
|
2009-11-11 13:22:13 -06:00
|
|
|
'''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])
|
|
|
|
# ------------------------------------------------------------------------------
|