[Zope-dev] Unit tests for Zope products: how to test HTTP access to objects in ZODB?

Dieter Maurer dieter@handshake.de
Fri, 8 Nov 2002 23:07:59 +0100


Craeg K Strong writes:
 > I am trying to add some unit tests for my XMLTransform product
 > that test URL to Zope object traversal.  For example, I want
 > to ensure that one XSLT (a zope object) can include another using
 > 
 > <xsl:include "../foo.xsl"/>
 > 
 > Zope should transform the above into a request for a zope object
 > with an ID of "foo.xsl" in the parent folder of the original XSLT.
 > 
 > My question: how have you, dear reader, tested Zope's mapping of
 > URLs (relative and/or absolute) to objects in ZODB?
I use the "request" module found in

  <http://www.dieter.handshake.de/pyprojects/zope>

to create a request object with its "getAuthRequest".
Then I use its "traverse" to traverse to the object
(as ZPublisher would do) and call it then.


Dieter