Back to index

plone3  3.1.7
test_SkinnedFolder.py
Go to the documentation of this file.
00001 ##############################################################################
00002 #
00003 # Copyright (c) 2006 Zope Corporation and Contributors. All Rights Reserved.
00004 #
00005 # This software is subject to the provisions of the Zope Public License,
00006 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
00007 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
00008 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00009 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
00010 # FOR A PARTICULAR PURPOSE.
00011 #
00012 ##############################################################################
00013 """ Unit tests for SkinnedFolder module.
00014 
00015 $Id: test_SkinnedFolder.py 68344 2006-05-29 14:19:25Z yuppie $
00016 """
00017 
00018 import unittest
00019 import Testing
00020 
00021 from Products.CMFCore.testing import ConformsToFolder
00022 
00023 
00024 class SkinnedFolderTests(ConformsToFolder, unittest.TestCase):
00025 
00026     def _getTargetClass(self):
00027         from Products.CMFDefault.SkinnedFolder import SkinnedFolder
00028 
00029         return SkinnedFolder
00030 
00031     def test_z2interfaces(self):
00032         from Interface.Verify import verifyClass
00033         from OFS.IOrderSupport import IOrderedContainer
00034 
00035         verifyClass(IOrderedContainer, self._getTargetClass())
00036 
00037     def test_z3interfaces(self):
00038         from zope.interface.verify import verifyClass
00039         from OFS.interfaces import IOrderedContainer
00040         from Products.CMFCore.interfaces import IContentish
00041 
00042         verifyClass(IContentish, self._getTargetClass())
00043         verifyClass(IOrderedContainer, self._getTargetClass())
00044 
00045 
00046 def test_suite():
00047     return unittest.TestSuite((
00048         unittest.makeSuite(SkinnedFolderTests),
00049         ))
00050 
00051 if __name__ == '__main__':
00052     unittest.main(defaultTest='test_suite')