Back to index

plone3  3.1.7
test_functional.py
Go to the documentation of this file.
00001 ##############################################################################
00002 #
00003 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
00004 # All Rights Reserved.
00005 #
00006 # This software is subject to the provisions of the Zope Public License,
00007 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
00008 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
00009 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00010 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
00011 # FOR A PARTICULAR PURPOSE.
00012 #
00013 ##############################################################################
00014 
00015 import os, sys
00016 
00017 # Load fixture
00018 from Testing import ZopeTestCase
00019 
00020 # Install our product
00021 ZopeTestCase.installProduct('ExternalEditor')
00022 
00023 from OFS.SimpleItem import SimpleItem
00024 class SideEffects(SimpleItem):
00025     meta_type = 'Side Effects'
00026     def __init__(self, id, content):
00027         self.id = id
00028         self.content = content
00029     def manage_FTPget(self, REQUEST, RESPONSE):
00030         RESPONSE.setHeader('Content-Type', 'text/plain')
00031         return self.content
00032 
00033 def test_suite():
00034     import unittest
00035     suite = unittest.TestSuite()
00036     from Testing.ZopeTestCase import doctest
00037     FileSuite = doctest.FunctionalDocFileSuite
00038     files = [
00039         'link.txt',
00040         'edit.txt',
00041         ]
00042     for f in files:
00043         suite.addTest(
00044             FileSuite(f, package='Products.ExternalEditor.tests'))
00045     return suite