I know how to unit test my views using something like this:
class ViewsTests(unittest.TestCase):
def setUp(self):
request = DummyRequest()
self.config = setUp(request=request)
def tearUp(self):
tearUp()
def test_home(self):
request = DummyRequest()
inst = MyView(request)
result = inst.View1()
self.assertEqual(result['page_title'], 'Test')
The problem with this is that it won't test my Chamelon templates. Sometimes, typos slip in .pt files and my view tests won't catch them.
I figured I can make an integration test using webtest, but sometimes it's hard to hit all code paths to try to render all my templates by requesting an URL...
Is there a simple way I can test the templates themselves to make sure they render fine?