[10190] | 1 | import unittest |
---|
| 2 | |
---|
| 3 | #from zope.testing import doctestunit |
---|
| 4 | #from zope.component import testing |
---|
| 5 | from Testing import ZopeTestCase as ztc |
---|
| 6 | |
---|
| 7 | from Products.Five import fiveconfigure |
---|
| 8 | from Products.PloneTestCase import PloneTestCase as ptc |
---|
| 9 | from Products.PloneTestCase.layer import PloneSite |
---|
| 10 | ptc.setupPloneSite() |
---|
| 11 | |
---|
| 12 | import ngren.theme |
---|
| 13 | |
---|
| 14 | |
---|
| 15 | class TestCase(ptc.PloneTestCase): |
---|
| 16 | |
---|
| 17 | class layer(PloneSite): |
---|
| 18 | |
---|
| 19 | @classmethod |
---|
| 20 | def setUp(cls): |
---|
| 21 | fiveconfigure.debug_mode = True |
---|
| 22 | ztc.installPackage(ngren.theme) |
---|
| 23 | fiveconfigure.debug_mode = False |
---|
| 24 | |
---|
| 25 | @classmethod |
---|
| 26 | def tearDown(cls): |
---|
| 27 | pass |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | def test_suite(): |
---|
| 31 | return unittest.TestSuite([ |
---|
| 32 | |
---|
| 33 | # Unit tests |
---|
| 34 | #doctestunit.DocFileSuite( |
---|
| 35 | # 'README.txt', package='ngren.theme', |
---|
| 36 | # setUp=testing.setUp, tearDown=testing.tearDown), |
---|
| 37 | |
---|
| 38 | #doctestunit.DocTestSuite( |
---|
| 39 | # module='ngren.theme.mymodule', |
---|
| 40 | # setUp=testing.setUp, tearDown=testing.tearDown), |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | # Integration tests that use PloneTestCase |
---|
| 44 | #ztc.ZopeDocFileSuite( |
---|
| 45 | # 'README.txt', package='ngren.theme', |
---|
| 46 | # test_class=TestCase), |
---|
| 47 | |
---|
| 48 | #ztc.FunctionalDocFileSuite( |
---|
| 49 | # 'browser.txt', package='ngren.theme', |
---|
| 50 | # test_class=TestCase), |
---|
| 51 | |
---|
| 52 | ]) |
---|
| 53 | |
---|
| 54 | if __name__ == '__main__': |
---|
| 55 | unittest.main(defaultTest='test_suite') |
---|