[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher/XMLRPC/tests - testXMLRPCRequest.py:1.2.2.1

Stephan Richter srichter@cbu.edu
Fri, 14 Jun 2002 10:48:34 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/Publisher/XMLRPC/tests
In directory cvs.zope.org:/tmp/cvs-serv20580/lib/python/Zope/Publisher/XMLRPC/tests

Modified Files:
      Tag: srichter-z3-unicode-branch
	testXMLRPCRequest.py 
Log Message:
Branch-specifc commit, so that Barry and Fred can help me debug the existing
errors.


=== Zope3/lib/python/Zope/Publisher/XMLRPC/tests/testXMLRPCRequest.py 1.2 => 1.2.2.1 ===
 import unittest
 
+from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup 
+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.XMLRPC.XMLRPCRequest import XMLRPCRequest
 from Zope.Publisher.XMLRPC.XMLRPCResponse import XMLRPCResponse
 
@@ -22,8 +30,6 @@
 
 from cStringIO import StringIO
 
-from Zope.Publisher.HTTP.tests.testHTTP import HTTPTests
-
 class Publication(DefaultPublication):
 
     require_docstrings = 0
@@ -46,7 +52,7 @@
 '''
     
 
-class XMLRPCTests(unittest.TestCase):
+class XMLRPCTests(unittest.TestCase, PlacelessSetup):
     """The only thing different to HTTP is the input processing; so there
        is no need to redo all the HTTP tests again.
     """
@@ -61,9 +67,12 @@
         'HTTP_AUTHORIZATION': 'Should be in accessible',
         'GATEWAY_INTERFACE':  'TestFooInterface/1.0',
         'HTTP_OFF_THE_WALL':  "Spam 'n eggs",
+        'HTTP_ACCEPT_CHARSET': 'ISO-8859-1, UTF-8;q=0.66, UTF-16;q=0.33', 
     }
 
     def setUp(self):
+        PlacelessSetup.setUp(self)
+        provideAdapter(IHTTPRequest, IUserPreferredCharsets, HTTPCharsets)
         class AppRoot:
             " "