Back to index

plone3  3.1.7
conformance.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 """ Mix-in classes for testing interface conformance.
00014 
00015 $Id: conformance.py 39493 2005-10-17 18:48:24Z yuppie $
00016 """
00017 
00018 class ConformsToISimpleItem:
00019 
00020     def test_conforms_to_Five_ISimpleItem(self):
00021         from zope.interface.verify import verifyClass
00022         from Products.Five.interfaces import ISimpleItem
00023 
00024         verifyClass(ISimpleItem, self._getTargetClass())
00025 
00026 class ConformsToIINIAware:
00027 
00028     def test_conforms_to_IINIAware(self):
00029         from zope.interface.verify import verifyClass
00030         from Products.CMFCore.interfaces import IINIAware
00031 
00032         verifyClass(IINIAware, self._getTargetClass())
00033 
00034 class ConformsToICSVAware:
00035 
00036     def test_conforms_to_ICSVAware(self):
00037         from zope.interface.verify import verifyClass
00038         from Products.CMFCore.interfaces import ICSVAware
00039 
00040         verifyClass(ICSVAware, self._getTargetClass())
00041 
00042 class ConformsToIFilesystemExporter:
00043     """ Mix-in for test cases whose target class implements IFilesystemExporter.
00044     """
00045     def test_conforms_to_IFilesystemExporter(self):
00046         from zope.interface.verify import verifyClass
00047         from Products.CMFCore.interfaces import IFilesystemExporter
00048 
00049         verifyClass(IFilesystemExporter, self._getTargetClass())
00050 
00051 class ConformsToIFilesystemImporter:
00052     """ Mix-in for test cases whose target class implements IFilesystemImporter.
00053     """
00054     def test_conforms_to_IFilesystemImporter(self):
00055         from zope.interface.verify import verifyClass
00056         from Products.CMFCore.interfaces import IFilesystemImporter
00057 
00058         verifyClass(IFilesystemImporter, self._getTargetClass())