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

Changeset 279

Show
Ignore:
Timestamp:
06/11/05 10:26:56
Author:
fumanchu
Message:

Integrated tut10 into test suite.

Files:

Legend:

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

    r274 r279  
    166166                         'Remi<br/>Carlos<br/>Hendrik<br/>Lorenzo Lamas<br/>' 
    167167                         '</body></html>') 
     168     
     169    def test10SessionFilter(self): 
     170        load_tut_module("tut10_sessionfilter") 
     171         
     172        helper.request('/') 
     173        self.assert_("viewed this page 1 times" in cpg.response.body) 
     174         
     175        helper.request('/', [('Cookie', dict(cpg.response.headers)['Set-Cookie'])]) 
     176        self.assert_("viewed this page 2 times" in cpg.response.body) 
    168177 
    169178 
  • trunk/cherrypy/tutorial/tut10_sessionfilter.py

    r278 r279  
    7070cpg.root = HitCounter() 
    7171 
    72 cpg.config.update(file = 'tut10_sessionfilter.conf') 
    73 cpg.server.start() 
     72if __name__ == '__main__': 
     73    cpg.config.update(file = 'tut10_sessionfilter.conf') 
     74    cpg.server.start() 
     75 

Hosted by WebFaction

Log in as guest/cpguest to create tickets