Esempio n. 1
0
 def testParseLongValue(self):
     '''
     Test parsing a long value.
     '''
     self.assertEqual(
             [('x', 'y'*128)],
             list(fastcgi.parseNameValues(fastcgi.writeNameValue('x', 'y'*128))))
Esempio n. 2
0
 def testParseLongName(self):
     '''
     Test the code paths for parsing a name or value with >= 128 bytes. The
     length prefixing is done differently in this case.
     '''
     self.assertEqual(
             [('x'*128, 'y')],
             list(fastcgi.parseNameValues(fastcgi.writeNameValue('x'*128, 'y'))))