[Zope] using manage_addProduct from a unit test ????

Dieter Maurer dieter@handshake.de
Thu, 18 Apr 2002 23:59:22 +0200


Robert Rottermann writes:
 > I would like to use 
 > manage_addProduct
 > from a unit test running outside of zope.
Outside of Zope but on a Zope ZODB?

  If you answer "yes", then

     import Zope
     R= Zope.app()
     get_transaction().begin()
     dest=R.<path to your destination>
     dest.manage_addProduct[...]... # use as usual
     get_transaction().commit()

  If you answer "no", then you need to emulate part of Zope's
  product registry -- too difficult to explain here.


Dieter