Back to index

plone3  3.1.7
test_exportimport.py
Go to the documentation of this file.
00001 # -*- coding: utf-8 -*-
00002 ## CMFPlacefulWorflow
00003 ## Copyright (C)2006 Ingeniweb
00004 
00005 ## This program is free software; you can redistribute it and/or modify
00006 ## it under the terms of the GNU General Public License as published by
00007 ## the Free Software Foundation; either version 2 of the License, or
00008 ## (at your option) any later version.
00009 
00010 ## This program is distributed in the hope that it will be useful,
00011 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 ## GNU General Public License for more details.
00014 
00015 ## You should have received a copy of the GNU General Public License
00016 ## along with this program; see the file COPYING. If not, write to the
00017 ## Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 """
00019 Contributed by Jazkarta
00020 """
00021 __version__ = "$Revision:  $"
00022 # $Source:  $
00023 # $Id:  $
00024 __docformat__ = 'restructuredtext'
00025 
00026 from zope.testing import doctest
00027 from Testing.ZopeTestCase import ZopeDocFileSuite
00028 
00029 from Products.GenericSetup import EXTENSION
00030 from Products.GenericSetup import profile_registry
00031 
00032 from Products.CMFPlone.interfaces import IPloneSiteRoot
00033 
00034 from CMFPlacefulWorkflowTestCase import CMFPlacefulWorkflowTestCase
00035 
00036 OPTIONFLAGS = (doctest.ELLIPSIS |
00037                doctest.NORMALIZE_WHITESPACE |
00038                #doctest.REPORT_ONLY_FIRST_FAILURE |
00039                doctest.REPORT_UDIFF)
00040 
00041 class ExportImportLayer(
00042     CMFPlacefulWorkflowTestCase.layer):
00043 
00044     @classmethod
00045     def setUp(cls):
00046         profile_registry.registerProfile(
00047             name='exportimport', title='Test Placeful Workflow Profile',
00048             description=(
00049                 "Tests the placeful workflow policy handler."),
00050             path='profiles/exportimport',
00051             product='Products.CMFPlacefulWorkflow.tests',
00052             profile_type=EXTENSION, for_=IPloneSiteRoot)
00053 
00054     @classmethod
00055     def tearDown(cls):
00056         pass
00057 
00058     @classmethod
00059     def testSetUp(cls):
00060         pass
00061 
00062     @classmethod
00063     def testTearDown(cls):
00064         pass
00065 
00066 def test_suite():
00067     suite = ZopeDocFileSuite(
00068         'exportimport.txt',
00069         optionflags=OPTIONFLAGS,
00070         test_class=CMFPlacefulWorkflowTestCase)
00071     suite.layer = ExportImportLayer
00072     return suite
00073 
00074 if __name__ == '__main__':
00075     unittest.main(defaultTest='test_suite')