Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 734

Show
Ignore:
Timestamp:
10/10/05 22:41:41
Author:
dowski
Message:

1. Updated test_xmlrpc_filter.py to test argument passing.
2. Added test_sessionauthenticate_filter.py to test.py.
3. Added comment _cphttptools.py regarding iterable() wrapping strings as single item lists.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cphttptools.py

    r728 r734  
    512512        body = flattener(body) 
    513513    elif isinstance(body, basestring): 
     514        # strings get wrapped in a list because iterating over a single 
     515        # item list is much faster than iterating over every character 
     516        # in a long string. 
    514517        body = [body] 
    515518    elif body is None: 
  • trunk/cherrypy/test/test.py

    r730 r734  
    345345        'test_virtualhost_filter', 
    346346        'test_session_filter', 
     347        'test_sessionauthenticate_filter', 
    347348        'test_xmlrpc_filter', 
    348349    ] 
  • trunk/cherrypy/test/test_xmlrpc_filter.py

    r730 r734  
    7474    return_boolean.exposed = True 
    7575 
     76    def test_argument_passing(self, num): 
     77        return num * 2 
     78    test_argument_passing.exposed = True 
     79 
    7680cherrypy.root = Root() 
    7781cherrypy.root.xmlrpc = XmlRpc() 
     
    124128                         True 
    125129                         ) 
     130        self.assertEqual(proxy.test_argument_passing(22),  
     131                        22 * 2 
     132                        ) 
    126133 
    127134 

Hosted by WebFaction

Log in as guest/cpguest to create tickets