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

Changeset 795

Show
Ignore:
Timestamp:
11/07/05 15:36:42
Author:
fumanchu
Message:

New positional params test for intermediate index methods (they shouldn't be called with positional params--use a "default" method instead).

Files:

Legend:

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

    r786 r795  
    135135        self.assertBody("default for dir1, param is:('dir2', 'dir3', 'dir4', 'index')") 
    136136         
    137         # Test positional parameters 
    138         self.getPage("/dir1/dir2/posparam/18/24/hut/hike") 
    139         self.assertBody("18/24/hut/hike") 
    140          
    141137        self.getPage("/redirect") 
    142138        self.assertStatus('302 Found') 
     
    148144        self.getPage("/Von%20B%fclow?ID=14") 
    149145        self.assertBody("ID is 14") 
     146         
     147    def testPositionalParams(self): 
     148        self.getPage("/dir1/dir2/posparam/18/24/hut/hike") 
     149        self.assertBody("18/24/hut/hike") 
     150         
     151        # intermediate index methods should not receive posparams; 
     152        # only the "final" index method should do so. 
     153        self.getPage("/dir1/dir2/5/3/sir") 
     154        self.assertBody("default for dir1, param is:('dir2', '5', '3', 'sir')") 
    150155     
    151156    def testExpose(self): 

Hosted by WebFaction

Log in as guest/cpguest to create tickets