[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Publisher/Browser/tests - testFileResource.py:1.1.2.1 testResources.py:1.2.2.1
Stephan Richter
srichter@cbu.edu
Fri, 14 Jun 2002 10:49:01 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/Publisher/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv20580/lib/python/Zope/App/Publisher/Browser/tests
Modified Files:
Tag: srichter-z3-unicode-branch
testFileResource.py testResources.py
Log Message:
Branch-specifc commit, so that Barry and Fred can help me debug the existing
errors.
=== Zope3/lib/python/Zope/App/Publisher/Browser/tests/testFileResource.py 1.1 => 1.1.2.1 ===
import os
+
from Zope.Exceptions import NotFoundError
+
+from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
+from Zope.ComponentArchitecture.GlobalResourceService import provideResource
+from Zope.ComponentArchitecture.GlobalAdapterService import provideAdapter
+
+from Zope.I18n.IUserPreferredCharsets import IUserPreferredCharsets
+
+from Zope.Publisher.HTTP.HTTPRequest import IHTTPRequest
+from Zope.Publisher.HTTP.HTTPCharsets import HTTPCharsets
from Zope.Publisher.Browser.BrowserRequest import TestRequest
-import Zope.App.Publisher.Browser.tests as p
-test_directory = os.path.split(p.__file__)[0]
+
from Zope.App.Publisher.Browser.FileResource import FileResourceFactory
from Zope.App.Publisher.Browser.FileResource import ImageResourceFactory
+import Zope.App.Publisher.Browser.tests as p
+
+test_directory = os.path.split(p.__file__)[0]
+
+
+class Test(PlacelessSetup, TestCase):
-class Test(TestCase):
+ def setUp(self):
+ PlacelessSetup.setUp(self)
+ provideAdapter(IHTTPRequest, IUserPreferredCharsets, HTTPCharsets)
def testNoTraversal(self):
=== Zope3/lib/python/Zope/App/Publisher/Browser/tests/testResources.py 1.2 => 1.2.2.1 ===
from unittest import TestCase, TestSuite, main, makeSuite
-from Zope.Publisher.Browser.BrowserRequest import TestRequest
from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
from Zope.ComponentArchitecture.GlobalResourceService import provideResource
+from Zope.ComponentArchitecture.GlobalAdapterService import provideAdapter
+
+from Zope.I18n.IUserPreferredCharsets import IUserPreferredCharsets
+
+from Zope.Publisher.HTTP.HTTPRequest import IHTTPRequest
+from Zope.Publisher.HTTP.HTTPCharsets import HTTPCharsets
+from Zope.Publisher.Browser.BrowserRequest import TestRequest
from Zope.Publisher.Browser.IBrowserView import IBrowserView
class Test(PlacelessSetup, TestCase):
+
+ def setUp(self):
+ PlacelessSetup.setUp(self)
+ provideAdapter(IHTTPRequest, IUserPreferredCharsets, HTTPCharsets)
+
def test(self):
from Zope.App.Publisher.Browser.Resources import Resources