Back to index

plone3  3.1.7
test_externaleditor.py
Go to the documentation of this file.
00001 ################################################################################
00002 #
00003 # Copyright (c) 2002-2005, Benjamin Saller <bcsaller@ideasuite.com>, and
00004 #                              the respective authors. All rights reserved.
00005 # For a list of Archetypes contributors see docs/CREDITS.txt.
00006 #
00007 # Redistribution and use in source and binary forms, with or without
00008 # modification, are permitted provided that the following conditions are met:
00009 #
00010 # * Redistributions of source code must retain the above copyright notice, this
00011 #   list of conditions and the following disclaimer.
00012 # * Redistributions in binary form must reproduce the above copyright notice,
00013 #   this list of conditions and the following disclaimer in the documentation
00014 #   and/or other materials provided with the distribution.
00015 # * Neither the name of the author nor the names of its contributors may be used
00016 #   to endorse or promote products derived from this software without specific
00017 #   prior written permission.
00018 #
00019 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
00020 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00021 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
00022 # FOR A PARTICULAR PURPOSE.
00023 #
00024 ################################################################################
00025 
00026 from Products.Archetypes.tests.atsitetestcase import ATSiteTestCase
00027 from Products.Archetypes.tests.utils import makeContent
00028 
00029 from Products.Archetypes.atapi import *
00030 from Products.Archetypes.interfaces.base import IBaseUnit
00031 
00032 
00033 class ExternalEditorTest(ATSiteTestCase):
00034 
00035     def testExternalEditor(self):
00036         #really a test that baseobject.__getitem__ returns something
00037         #which externaleditor can use
00038         obj = makeContent(self.folder, portal_type='SimpleType', id='obj')
00039         self.failUnless(IBaseUnit.isImplementedBy(obj.body))
00040 
00041 
00042 def test_suite():
00043     from unittest import TestSuite, makeSuite
00044     suite = TestSuite()
00045     suite.addTest(makeSuite(ExternalEditorTest))
00046     return suite