Ticket #1217: test_controllers.py_tmpl.diff
| File test_controllers.py_tmpl.diff, 1.1 kB (added by jeffk, 2 years ago) |
|---|
-
test_controllers.py_tmpl
old new 1 #if $identity != "none" 2 import turbogears 3 #end if 1 4 from turbogears import testutil 2 5 from ${package}.controllers import Root 3 6 import cherrypy … … 9 12 import types 10 13 result = testutil.call(cherrypy.root.index) 11 14 assert type(result["now"]) == types.StringType 15 #if $identity != "none" 16 turbogears.startup.stopTurboGears() 17 #end if 12 18 13 19 def test_indextitle(): 14 " The mainpage should have the right title"20 "the index page should have the right title" 15 21 testutil.createRequest("/") 16 22 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 28 def 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