plone.app.discussion/dev/src/discussion.examplecontent/discussion/examplecontent/tests.py
Timo Stollenwerk 6c7909a4f7 discussion.examplecontent added to src folder.
svn path=/plone.app.discussion/buildouts/; revision=27163
2009-05-27 19:45:06 +00:00

54 lines
1.4 KiB
Python

import unittest
from zope.testing import doctestunit
from zope.component import testing
from Testing import ZopeTestCase as ztc
from Products.Five import zcml
from Products.Five import fiveconfigure
from Products.PloneTestCase import PloneTestCase as ptc
from Products.PloneTestCase.layer import PloneSite
ptc.setupPloneSite()
import discussion.examplecontent
class TestCase(ptc.PloneTestCase):
class layer(PloneSite):
@classmethod
def setUp(cls):
fiveconfigure.debug_mode = True
ztc.installPackage(discussion.examplecontent)
fiveconfigure.debug_mode = False
@classmethod
def tearDown(cls):
pass
def test_suite():
return unittest.TestSuite([
# Unit tests
#doctestunit.DocFileSuite(
# 'README.txt', package='discussion.examplecontent',
# setUp=testing.setUp, tearDown=testing.tearDown),
#doctestunit.DocTestSuite(
# module='discussion.examplecontent.mymodule',
# setUp=testing.setUp, tearDown=testing.tearDown),
# Integration tests that use PloneTestCase
#ztc.ZopeDocFileSuite(
# 'README.txt', package='discussion.examplecontent',
# test_class=TestCase),
#ztc.FunctionalDocFileSuite(
# 'browser.txt', package='discussion.examplecontent',
# test_class=TestCase),
])
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')