[Zope-ZEO] Advice

Chris McDonough chrism@digicool.com
Mon, 25 Sep 2000 10:48:51 -0400


Toby Dickenson wrote:

> ... but not a complete replication of the deployed environment. For
> example, you cant test RESPONSE.write.
>
> From a philosophical point of view, using Zope.debug is wrong because
> the whole purpose is an integration test of the interactions of your
> pre-tested components with the Zope environment (depending on the
> complexity of your glue, you may also think of it as a unit test of
> that glue).

I'd argue that there's not much difference (besides not being able to stream
to a RESPONSE, as you've noted) between manually "testing" your methods in
Zope via a browser and using Zope.debug programmatically.  Both procedures
exercise the same machinery.

> >I like your ideas of using DemoStorage.  This
> >allows you to really test interactions with the
> >persistence system without making persistent changes.
> >The alternative would be to install a null transaction
> >manager, but this wouldn't provide a faithful
> >simulation of persistence behavior as use of
> >DemoStorage does.

This is another thing that should probably go in the unit test docs.  I'll
tinker around a little with it.