[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher/HTTP/tests - testHTTP.py:1.4

Stephan Richter srichter@cbu.edu
Thu, 13 Jun 2002 20:57:20 -0400


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

Modified Files:
	testHTTP.py 
Log Message:
Wrote some code that will convert form and cookie keys and values to
unicode, assuming an UTF-8 encoding. At some point we should probably find
a way to set the encoding based on a place. But this requires some more
serious infrastructure changes and should be discussed first. For now I am
happy that all the input is unicodefied.


=== Zope3/lib/python/Zope/Publisher/HTTP/tests/testHTTP.py 1.3 => 1.4 ===
         req = self._createRequest(extra_env=cookies)
 
-        self.assertEquals(req.cookies['foo'], 'bar')
-        self.assertEquals(req['foo'], 'bar')
+        self.assertEquals(req.cookies[u'foo'], u'bar')
+        self.assertEquals(req[u'foo'], u'bar')
 
-        self.assertEquals(req.cookies['spam'], 'eggs')
-        self.assertEquals(req['spam'], 'eggs')
+        self.assertEquals(req.cookies[u'spam'], u'eggs')
+        self.assertEquals(req[u'spam'], u'eggs')
 
-        self.assertEquals(req.cookies['this'], 'Should be accepted')
-        self.assertEquals(req['this'], 'Should be accepted')
+        self.assertEquals(req.cookies[u'this'], u'Should be accepted')
+        self.assertEquals(req[u'this'], u'Should be accepted')
 
     def testBasicAuth(self):
         from Zope.Publisher.HTTP.IHTTPCredentials import IHTTPCredentials