This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
plone.formwidget.captcha/plone/formwidget/captcha/tests.py

55 lines
1.5 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 plone.formwidget.captcha
class TestCase(ptc.PloneTestCase):
class layer(PloneSite):
@classmethod
def setUp(cls):
fiveconfigure.debug_mode = True
zcml.load_config('configure.zcml',
plone.formwidget.captcha)
fiveconfigure.debug_mode = False
@classmethod
def tearDown(cls):
pass
def test_suite():
return unittest.TestSuite([
# Unit tests
doctestunit.DocFileSuite(
'README.txt', package='plone.formwidget.captcha',
setUp=testing.setUp, tearDown=testing.tearDown),
#doctestunit.DocTestSuite(
# module='plone.formwidget.captcha.mymodule',
# setUp=testing.setUp, tearDown=testing.tearDown),
# Integration tests that use PloneTestCase
#ztc.ZopeDocFileSuite(
# 'README.txt', package='plone.formwidget.captcha',
# test_class=TestCase),
#ztc.FunctionalDocFileSuite(
# 'browser.txt', package='plone.formwidget.captcha',
# test_class=TestCase),
])
if __name__ == '__main__':
unittest.main(defaultTest='test_suite')