Like this: http://collective-docs.readthedocs.org/en/latest/testing_and_debugging/functional_testing.html
On Wed, Nov 9, 2011 at 9:58 AM, Raphael Ritz <[email protected]> wrote: > On 11/8/11 8:31 PM, Maarten Nieber wrote: >> >> Hi, >> >> I have a document (Meeting) and would like to test if plone renders it >> without >> producing errors. Manually, I would do this by going to the document url >> inside >> the plone site. How can I do this in a test? >> >> My test already instantiates the document, so I just need to know how I >> can ask >> plone to "render" it (generate the HTML output for this document). > > Call its 'view' (aka <obj>.view()) > > Be sure to have a REQUEST around. You typically have > a mock REQUEST around in unit tests but if you need > a "real one" see here: > http://collective-docs.readthedocs.org/en/latest/testing_and_debugging/unit_testing.html#id14 > > Raphael > > > >> >> Thanks! >> Maarten > > > _______________________________________________ > Product-Developers mailing list > [email protected] > https://lists.plone.org/mailman/listinfo/plone-product-developers > -- Mikko Ohtamaa http://opensourcehacker.com http://twitter.com/moo9000 _______________________________________________ Product-Developers mailing list [email protected] https://lists.plone.org/mailman/listinfo/plone-product-developers
