Ticket #1217: test_controllers.py_tmpl.diff

File test_controllers.py_tmpl.diff, 1.1 kB (added by jeffk, 2 years ago)

patch to add stopTurboGears and login page title test to identity quickstart

  • test_controllers.py_tmpl

    old new  
     1#if $identity != "none" 
     2import turbogears 
     3#end if 
    14from turbogears import testutil 
    25from ${package}.controllers import Root 
    36import cherrypy 
     
    912    import types 
    1013    result = testutil.call(cherrypy.root.index) 
    1114    assert type(result["now"]) == types.StringType 
     15#if $identity != "none" 
     16    turbogears.startup.stopTurboGears() 
     17#end if 
    1218 
    1319def test_indextitle(): 
    14     "The mainpage should have the right title" 
     20    "the index page should have the right title" 
    1521    testutil.createRequest("/") 
    1622    assert "<title>Welcome to TurboGears</title>" in cherrypy.response.body[0] 
     23#if $identity != "none" 
     24    turbogears.startup.stopTurboGears() 
     25#end if 
     26#if $identity != "none" 
     27 
     28def test_logintitle(): 
     29    "login page should have the right title" 
     30    testutil.createRequest("/login") 
     31    assert "<title>Login</title>" in cherrypy.response.body[0] 
     32    turbogears.startup.stopTurboGears() 
     33#end if