source: products/quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/tests.py @ 1159

Last change on this file since 1159 was 1159, checked in by piv, 15 years ago

started with doc tests

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1import unittest
2
3from zope.testing import doctestunit
4from zope.component import testing
5from Testing import ZopeTestCase as ztc
6
7from Products.Five import zcml
8from Products.Five import fiveconfigure
9from Products.PloneTestCase import PloneTestCase as ptc
10from Products.PloneTestCase.layer import PloneSite
11ptc.setupPloneSite()
12
13import quintagroup.dropdownmenu
14
15class TestCase(ptc.PloneTestCase):
16    class layer(PloneSite):
17        @classmethod
18        def setUp(cls):
19            fiveconfigure.debug_mode = True
20            ztc.installPackage(quintagroup.dropdownmenu)
21            fiveconfigure.debug_mode = False
22
23        @classmethod
24        def tearDown(cls):
25            pass
26
27
28def test_suite():
29    return unittest.TestSuite([
30
31        # Unit tests
32        #doctestunit.DocFileSuite(
33        #    'README.txt', package='quintagroup.dropdownmenu',
34        #    setUp=testing.setUp, tearDown=testing.tearDown),
35
36        #doctestunit.DocTestSuite(
37        #    module='quintagroup.dropdownmenu.mymodule',
38        #    setUp=testing.setUp, tearDown=testing.tearDown),
39
40
41        # Integration tests that use PloneTestCase
42        ztc.ZopeDocFileSuite(
43            'menu.txt', package='quintagroup.dropdownmenu',
44            test_class=TestCase),
45
46        ztc.ZopeDocFileSuite(
47            'controlpanel.txt', package='quintagroup.dropdownmenu',
48            test_class=TestCase),
49
50        #ztc.FunctionalDocFileSuite(
51        #    'browser.txt', package='quintagroup.dropdownmenu',
52        #    test_class=TestCase),
53
54        ])
55
56if __name__ == '__main__':
57    unittest.main(defaultTest='test_suite')
Note: See TracBrowser for help on using the repository browser.