/usr/lib/python2.7/dist-packages/zope/html/tests.py is in python-zope.html 2.2.0-0ubuntu11.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | ##############################################################################
#
# Copyright (c) 2007 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Test harness for zope.html.
"""
__docformat__ = "reStructuredText"
import os
import unittest
from zope.testing import doctest
import pytz
import zope.annotation.attribute
import zope.formlib.tests.test_textareawidget
import zope.app.testing.placelesssetup
import zope.component
import zope.file.testing
import zope.interface.common.idatetime
import zope.mimetype.types
import zope.publisher.interfaces
from zope.app.testing import functional
import zope.html.widget
class FckeditorWidgetTestCase(
zope.formlib.tests.test_textareawidget.TextAreaWidgetTest):
_WidgetFactory = zope.html.widget.FckeditorWidget
def setUp(test):
zope.app.testing.placelesssetup.setUp()
zope.component.provideAdapter(
zope.annotation.attribute.AttributeAnnotations)
# we have to initialize the mimetype handling
zope.mimetype.types.setup()
def tearDown(test):
zope.app.testing.placelesssetup.tearDown()
@zope.component.adapter(zope.publisher.interfaces.IRequest)
@zope.interface.implementer(zope.interface.common.idatetime.ITZInfo)
def requestToTZInfo(request):
return pytz.timezone('US/Eastern')
EditableHtmlLayer = zope.file.testing.ZCMLLayer(
os.path.join(os.path.dirname(__file__), 'ftesting.zcml'),
__name__, "EditableHtmlLayer")
def test_suite():
ftests = zope.file.testing.FunctionalBlobDocFileSuite("browser.txt")
ftests.layer = EditableHtmlLayer
return unittest.TestSuite([
doctest.DocFileSuite(
"docinfo.txt",
setUp=setUp,
tearDown=tearDown),
doctest.DocFileSuite(
"widget.txt",
optionflags=(doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE)),
unittest.makeSuite(FckeditorWidgetTestCase),
ftests,
])
|