Back to index

plone3  3.1.7
test_kss.py
Go to the documentation of this file.
00001 import unittest
00002 from zope.testing import doctest, cleanup
00003 from Products.Five import zcml
00004 
00005 import Products.Five
00006 import kss.core
00007 import kss.core.tests
00008 import plone.app.kss
00009 import plone.app.form
00010 import plone.memoize
00011 
00012 optionflags =  (doctest.ELLIPSIS |
00013                 doctest.NORMALIZE_WHITESPACE)
00014 
00015 
00016 def setUp(test):
00017     zcml.load_config('configure.zcml', Products.Five)
00018     zcml.load_config('meta.zcml', kss.core)
00019     zcml.load_config('configure.zcml', kss.core)
00020     zcml.load_config('configure-unittest.zcml', kss.core.tests)
00021     zcml.load_config('configure.zcml', plone.app.form)
00022     zcml.load_config('configure.zcml', plone.memoize)
00023     zcml.load_config('configure.zcml', plone.app.kss)
00024 
00025 def tearDown(test):
00026     cleanup.cleanUp()
00027 
00028 def test_suite():
00029     return unittest.TestSuite([
00030         doctest.DocFileSuite('kss/formlib_kss.txt',
00031                              package='plone.app.form',
00032                              setUp=setUp,
00033                              tearDown=tearDown,
00034                              optionflags=optionflags),
00035         ])