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

Changeset 552

Show
Ignore:
Timestamp:
08/24/05 12:24:55
Author:
fumanchu
Message:

Added test for URL's which are not valid Python identifiers.

Files:

Legend:

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

    r522 r552  
    5353    def notExposed(self): 
    5454        return "not exposed" 
     55 
     56def mapped_func(self, ID=None): 
     57    return "ID is %s" % ID 
     58mapped_func.exposed = True 
     59setattr(Root, "Von B\xfclow", mapped_func) 
    5560 
    5661 
     
    137142        self.assertHeader('Location', 'http://%s:%s/dir1/' 
    138143                          % (self.HOST, self.PORT)) 
     144         
     145        # Test that we can use URL's which aren't all valid Python identifiers 
     146        self.getPage("/Von%20B\xfclow?ID=14") 
     147        self.assertBody("ID is 14") 
    139148 
    140149 

Hosted by WebFaction

Log in as guest/cpguest to create tickets