On Wednesday 01 August 2001 22:39, you wrote:
a couple of months ago, Chris McDonough tipsed me about a script called make_request.py that set up a fake request. I need this now to be able to write unit tests for CMF applications (which isn't trivial, me don't think - maybe a quasi-framework would be cool?).
Have you looked at ZUnit? I've started using it and it's pretty useful. Sure, it has no documentation, and unittest in zope 2.3.3 is way outta date, but we're still using it... sourceforge.net/projects/zunit Only available as CVS. Also, installation can be "fun" :) You must check out all three CVS modules. . ZUnit and ZUnitExternal _must_ be installed in SOFTWARE_HOME/lib/python/Products (ie. no INSTANCE_HOME/Products) . Shared_Hiper must be installed in SOFTWARE_HOME/lib/python/Shared as Hiper I wrote an actual README when I first started working with it, but recently lost the file due to some foolishness with upgrading my workstation :( In short, use the ZUnit-samples.xml export in the ZUnitExternal Product to see how a sample works. The other export files in ZUnit didn't work for me. You might also want to edit the failure.dtml and error.dtml in ZUnit/dtml/TestMonitor to make them not emit comments. Not sure what the rationale is there, but if you don't, you have to view the HTML source to see errors... Hope this helps, Richard