| OLD | NEW |
| (Empty) |
| 1 | |
| 2 # Copyright (c) 2001-2004 Twisted Matrix Laboratories. | |
| 3 # See LICENSE for details. | |
| 4 | |
| 5 | |
| 6 from twisted.trial import unittest | |
| 7 from twisted.protocols import dict | |
| 8 | |
| 9 paramString = "\"This is a dqstring \\w\\i\\t\\h boring stuff like: \\\"\" and t
\\hes\\\"e are a\\to\\ms" | |
| 10 goodparams = ["This is a dqstring with boring stuff like: \"", "and", "thes\"e",
"are", "atoms"] | |
| 11 | |
| 12 class ParamTest(unittest.TestCase): | |
| 13 def testParseParam(self): | |
| 14 """Testing command response handling""" | |
| 15 params = [] | |
| 16 rest = paramString | |
| 17 while 1: | |
| 18 (param, rest) = dict.parseParam(rest) | |
| 19 if param == None: | |
| 20 break | |
| 21 params.append(param) | |
| 22 self.failUnlessEqual(params, goodparams)#, "DictClient.parseParam return
s unexpected results") | |
| OLD | NEW |