Mercurial > genshi > genshi-test
comparison examples/turbogears/genshitest/tests/test_controllers.py @ 230:24757b771651
Renamed Markup to Genshi in repository.
author | cmlenz |
---|---|
date | Mon, 11 Sep 2006 15:07:07 +0000 |
parents | examples/turbogears/markuptest/tests/test_controllers.py@f8612f05af99 |
children |
comparison
equal
deleted
inserted
replaced
229:110d69dbbda3 | 230:24757b771651 |
---|---|
1 from turbogears import testutil | |
2 from genshitest.controllers import Root | |
3 import cherrypy | |
4 | |
5 cherrypy.root = Root() | |
6 | |
7 def test_method(): | |
8 "the index method should return a string called now" | |
9 import types | |
10 result = testutil.call(cherrypy.root.index) | |
11 assert type(result["now"]) == types.StringType | |
12 | |
13 def test_indextitle(): | |
14 "The mainpage should have the right title" | |
15 testutil.createRequest("/") | |
16 assert "<TITLE>Welcome to TurboGears</TITLE>" in cherrypy.response.body[0] |