~landscape/zope3/newer-from-ztk

« back to all changes in this revision

Viewing changes to src/twisted/test/test_dict.py

  • Committer: Thomas Hervé
  • Date: 2009-07-08 13:52:04 UTC
  • Revision ID: thomas@canonical.com-20090708135204-df5eesrthifpylf8
Remove twisted copy

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 returns unexpected results")