aboutsummaryrefslogtreecommitdiffstats
path: root/Bugs-Everywhere-Web/beweb/tests/test_controllers.py
diff options
context:
space:
mode:
authorAaron Bentley <abentley@panoramicfeedback.com>2006-04-11 09:23:30 -0400
committerAaron Bentley <abentley@panoramicfeedback.com>2006-04-11 09:23:30 -0400
commit162c3a3783555a11aed72a30369b6dff5e4e0cef (patch)
treef8d118d80f70ccfc7a6487d1127b84276397909c /Bugs-Everywhere-Web/beweb/tests/test_controllers.py
parent4d61b78146f12a93d4c3a0c3657439102ed8f63d (diff)
parent3747b40e76b3497da1ad081767e5d64a242deccf (diff)
downloadbugseverywhere-162c3a3783555a11aed72a30369b6dff5e4e0cef.tar.gz
Merge from home (TurboGears 0.9)
Diffstat (limited to 'Bugs-Everywhere-Web/beweb/tests/test_controllers.py')
-rw-r--r--Bugs-Everywhere-Web/beweb/tests/test_controllers.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/Bugs-Everywhere-Web/beweb/tests/test_controllers.py b/Bugs-Everywhere-Web/beweb/tests/test_controllers.py
new file mode 100644
index 0000000..0c77afe
--- /dev/null
+++ b/Bugs-Everywhere-Web/beweb/tests/test_controllers.py
@@ -0,0 +1,16 @@
+from turbogears import testutil
+from beweb.controllers import Root
+import cherrypy
+
+cherrypy.root = Root()
+
+def test_method():
+ "the index method should return a string called now"
+ import types
+ result = testutil.call(cherrypy.root.index)
+ assert type(result["now"]) == types.StringType
+
+def test_indextitle():
+ "The mainpage should have the right title"
+ testutil.createRequest("/")
+ assert "<TITLE>Welcome to TurboGears</TITLE>" in cherrypy.response.body[0]