[Zope-Checkins] CVS: Zope/lib/python/ZPublisher/tests - testHTTPRequest.py:1.1.2.5

Martijn Pieters mj@zope.com
Thu, 1 Aug 2002 14:38:42 -0400


Update of /cvs-repository/Zope/lib/python/ZPublisher/tests
In directory cvs.zope.org:/tmp/cvs-serv5311/lib/python/ZPublisher/tests

Modified Files:
      Tag: Zope-2_5-branch
	testHTTPRequest.py 
Log Message:
Fix for collector #500: Form variable names ending in dot and asking to be
converted to a tuple triggered an UnboundLocalError.


=== Zope/lib/python/ZPublisher/tests/testHTTPRequest.py 1.1.2.4 => 1.1.2.5 ===
                 self.failIf('<' in e,
                     '%s converter does not quote unsafe value!' % type)
 
+    def testNameWithDotAsTuple(self):
+        # Collector #500
+        inputs = (
+            ('name.:tuple', 'name with dot as tuple'),)
+        req = self._processInputs(inputs)
+        self._noFormValuesInOther(req)
+
+        formkeys = list(req.form.keys())
+        formkeys.sort()
+        self.assertEquals(formkeys, ['name.'])
+
+        self.assertEquals(req['name.'], ('name with dot as tuple',))
+
+        self._noTaintedValues(req)
+        self._onlyTaintedformHoldsTaintedStrings(req)
+            
 
 def test_suite():
     suite = unittest.TestSuite()