~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/tests/test_controllers.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-09-10 17:30:17 UTC
  • mfrom: (138.1.1 mwhudson-sucks)
  • Revision ID: pqm@pqm.ubuntu.com-20070910173017-teattztsb8ep0aer
[trivial] so i cleaned up the tests, but also broke them :( need to look at getting PQM to run the loggerhead tests...

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
from turbogears import testutil
2
 
from loggerhead.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]