From 7d32df3d33354dc34c1cb0a086463e4f23d968ce Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 7 Jan 2009 04:15:27 +0000 Subject: - Add a method named ``assert_`` to the DummyTemplateRenderer. This method accepts keyword arguments. Each key/value pair in the keyword arguments causes an assertion to be made that the renderer received this key with a value equal to the asserted value. - Projects generated by the paster templates now use the ``DummyTemplateRenderer.assert_`` method in their view tests. --- docs/narr/MyProject/myproject/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/narr/MyProject') diff --git a/docs/narr/MyProject/myproject/tests.py b/docs/narr/MyProject/myproject/tests.py index 4c2f6a9ec..64314616d 100644 --- a/docs/narr/MyProject/myproject/tests.py +++ b/docs/narr/MyProject/myproject/tests.py @@ -28,7 +28,7 @@ class ViewTests(unittest.TestCase): request = testing.DummyRequest() renderer = testing.registerDummyRenderer('templates/mytemplate.pt') response = my_view(context, request) - self.assertEqual(renderer.project, 'myproject') + renderer.assert_(project='myproject') class ViewIntegrationTests(unittest.TestCase): """ These tests are integration tests for the view. These test -- cgit v1.2.3