Back to index

plone3  3.1.7
common.py
Go to the documentation of this file.
00001 ##############################################################################
00002 #
00003 # Copyright (c) 2005 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 """ CMFTopic product:  unit test utilities.
00014 
00015 $Id: common.py 77369 2007-07-03 16:17:37Z yuppie $
00016 """
00017 
00018 from unittest import TestCase
00019 
00020 
00021 class CriterionTestCase(TestCase):
00022 
00023     def _makeOne(self, id, *args, **kw):
00024         return self._getTargetClass()(id, *args, **kw)
00025 
00026     def test_z2interfaces(self):
00027         from Interface.Verify import verifyClass
00028         from Products.CMFTopic.interfaces import Criterion as ICriterion
00029 
00030         verifyClass( ICriterion, self._getTargetClass() )
00031 
00032     def test_z3interfaces(self):
00033         from zope.interface.verify import verifyClass
00034         from Products.CMFTopic.interfaces import ICriterion
00035 
00036         verifyClass(ICriterion, self._getTargetClass())