Hi All,
I have a view that starts like this:
@bfg_view(renderer='templates/control.pt')
class Control:
def __init__(self,request):
self.request = request
def __call__(self):
...
return dict(
...
)
I'd like to do a functional test, in particular checking that the
template has no syntax errors in it and contains the data it should do
by checking for strings in the returned response.
I got this far:
class TestView(TestCase):
def setUp(self):
self.request = testing.DummyRequest()
self.config = Configurator()
self.config.begin(request=self.request)
self.config.scan(myapp)
def tearDown(self):
self.config.end()
def test_render(self):
view = Control(self.request)
But now what's the "right" way to actually get the to render the html,
preferably also testing the path dispatch to '/' at the same time?
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
_______________________________________________
Repoze-dev mailing list
[email protected]
http://lists.repoze.org/listinfo/repoze-dev