Commit afba13e9 authored by Andreas Jung's avatar Andreas Jung

added provideUtility() calls for UnicodeEncodingConflictResolver

in order to make "zopectl test" shut up
parent c940b163
......@@ -14,9 +14,12 @@
import unittest
import zope.component.testing
from zope.component import provideUtility
from zope.traversing.adapters import DefaultTraversable
from Products.PageTemplates.tests import util
from Products.PageTemplates.PageTemplate import PageTemplate
from Products.PageTemplates.interfaces import IUnicodeEncodingConflictResolver
from Products.PageTemplates.unicodeconflictresolver import DefaultUnicodeEncodingConflictResolver
from Acquisition import Implicit
from AccessControl import SecurityManager
from AccessControl.SecurityManagement import noSecurityManager
......@@ -50,6 +53,7 @@ class DTMLTests(zope.component.testing.PlacelessSetup, unittest.TestCase):
def setUp(self):
super(DTMLTests, self).setUp()
zope.component.provideAdapter(DefaultTraversable, (None,))
provideUtility(DefaultUnicodeEncodingConflictResolver, IUnicodeEncodingConflictResolver)
self.t = AqPageTemplate()
self.policy = UnitTestSecurityPolicy()
......
......@@ -14,11 +14,14 @@
import unittest
import zope.component.testing
from zope.component import provideUtility
from zope.traversing.adapters import DefaultTraversable
from Products.PageTemplates.tests import util
from Products.PageTemplates.PageTemplate import PageTemplate
from Products.PageTemplates.GlobalTranslationService import \
setGlobalTranslationService
from Products.PageTemplates.interfaces import IUnicodeEncodingConflictResolver
from Products.PageTemplates.unicodeconflictresolver import DefaultUnicodeEncodingConflictResolver
from AccessControl import SecurityManager
from AccessControl.SecurityManagement import noSecurityManager
......@@ -67,6 +70,8 @@ class HTMLTests(zope.component.testing.PlacelessSetup, unittest.TestCase):
super(HTMLTests, self).setUp()
zope.component.provideAdapter(DefaultTraversable, (None,))
provideUtility(DefaultUnicodeEncodingConflictResolver, IUnicodeEncodingConflictResolver)
self.folder = f = Folder()
f.laf = AqPageTemplate()
f.t = AqPageTemplate()
......
......@@ -15,6 +15,12 @@ class TypeSniffingTestCase(unittest.TestCase):
TEMPFILENAME = tempfile.mktemp(".zpt")
def setUp(self):
from zope.component import provideUtility
from Products.PageTemplates.interfaces import IUnicodeEncodingConflictResolver
from Products.PageTemplates.unicodeconflictresolver import DefaultUnicodeEncodingConflictResolver
provideUtility(DefaultUnicodeEncodingConflictResolver, IUnicodeEncodingConflictResolver)
def tearDown(self):
if os.path.exists(self.TEMPFILENAME):
os.unlink(self.TEMPFILENAME)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment