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

Changeset 341

Show
Ignore:
Timestamp:
06/20/05 08:07:39
Author:
rdelon
Message:

Re-numbered tutorials (after removing aspect tutorial) and updated test suite

Files:

Legend:

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

    r333 r341  
    127127        self.assertEqual(cpg.response.body, msg) 
    128128     
    129     def test06Aspects(self): 
    130         load_tut_module("tut06_aspects") 
    131         msg = ''' 
    132             <html> 
    133             <head> 
    134                 <title>Tutorial 6 -- Aspect Powered!</title> 
    135             <head> 
    136             <body> 
    137             <h2>Tutorial 6 -- Aspect Powered!</h2> 
    138          
    139             <p> 
    140             Isn't this exciting? There's 
    141             <a href="./another/">another page</a>, too! 
    142             </p> 
    143          
    144             </body> 
    145             </html> 
    146         ''' 
    147         helper.request("/") 
    148         self.assertEqual(cpg.response.body, msg) 
    149      
    150     def test07DefaultMethod(self): 
    151         load_tut_module("tut07_default_method") 
     129    def test06DefaultMethod(self): 
     130        load_tut_module("tut06_default_method") 
    152131        helper.request('/hendrik') 
    153132        self.assertEqual(cpg.response.body, 
     
    155134                         '(<a href="./">back</a>)') 
    156135     
    157     def test08Sessions(self): 
    158         load_tut_module("tut08_sessions") 
     136    def test07Sessions(self): 
     137        load_tut_module("tut07_sessions") 
    159138        cpg.config.update({"global": {"sessionFilter.on": True}}) 
    160139         
     
    171150                         "\n        ") 
    172151     
    173     def test09GeneratorsAndYield(self): 
    174         load_tut_module("tut09_generators_and_yield") 
     152    def test08GeneratorsAndYield(self): 
     153        load_tut_module("tut08_generators_and_yield") 
    175154        helper.request('/') 
    176155        self.assertEqual(cpg.response.body, 
     
    180159                         '</body></html>') 
    181160     
    182     def test10SessionFilter(self): 
    183         load_tut_module("tut10_sessionfilter") 
     161    def test09SessionFilter(self): 
     162        load_tut_module("tut09_sessionfilter") 
    184163        cpg.config.update({"global": {"sessionFilter.on": True}}) 
    185164         
     
    190169        self.assert_("viewed this page 2 times" in cpg.response.body) 
    191170     
    192     def test11FileUpload(self): 
    193         load_tut_module("tut11_file_upload") 
     171    def test10FileUpload(self): 
     172        load_tut_module("tut10_file_upload") 
    194173         
    195174        h = [("Content-type", "multipart/form-data; boundary=x"), 

Hosted by WebFaction

Log in as guest/cpguest to create tickets