summaryrefslogtreecommitdiff
path: root/docs/tutorials/bfgwiki/src/models
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorials/bfgwiki/src/models')
-rw-r--r--docs/tutorials/bfgwiki/src/models/tutorial/tests.py23
1 files changed, 2 insertions, 21 deletions
diff --git a/docs/tutorials/bfgwiki/src/models/tutorial/tests.py b/docs/tutorials/bfgwiki/src/models/tutorial/tests.py
index f367b7da0..1b540a60c 100644
--- a/docs/tutorials/bfgwiki/src/models/tutorial/tests.py
+++ b/docs/tutorials/bfgwiki/src/models/tutorial/tests.py
@@ -48,28 +48,9 @@ class AppmakerTests(unittest.TestCase):
self.failUnless(root['app_root'] is app_root)
class ViewTests(unittest.TestCase):
-
- """ These tests are unit tests for the view. They test the
- functionality of *only* the view. They register and use dummy
- implementations of repoze.bfg functionality to allow you to avoid
- testing 'too much'"""
-
- def setUp(self):
- """ cleanUp() is required to clear out the application registry
- between tests (done in setUp for good measure too)
- """
- testing.cleanUp()
-
- def tearDown(self):
- """ cleanUp() is required to clear out the application registry
- between tests
- """
- testing.cleanUp()
-
def test_my_view(self):
from tutorial.views import my_view
context = testing.DummyModel()
request = testing.DummyRequest()
- renderer = testing.registerDummyRenderer('templates/mytemplate.pt')
- response = my_view(context, request)
- renderer.assert_(project='tutorial')
+ info = my_view(context, request)
+ self.assertEqual(info['project'], 'tutorial')