From 820508eb8200692cc8b1510caa19903d2af79c5a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 10 Oct 2009 01:03:53 +0000 Subject: Convert bfgwiki to use renderers. --- .../tutorials/bfgwiki/src/models/tutorial/tests.py | 23 ++-------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'docs/tutorials/bfgwiki/src/models') 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') -- cgit v1.2.3