I've posted this message to the plone-users list, but since nobody has
answered and I think it's really related to Zope, I'm reposting the
message here. My apologies if you receive this message twice.

Hello list,

I'm trying to write some automated test for an *eggified* content-type
product I'm developing for Plone 2.5.

My question is:
 Is possible to install eggified products in zope-2.9.8 using ZopeTestCase?

And now the context:

Following the PPD book, I've put the following into the tests/base.py file:

# base.py
from zassh.eventoDeportivo.config import PROJECTNAME
from Testing import ZopeTestCase

from Products.Five import zcml, fiveconfigure

from Products.PloneTestCase.layer import onsetup

def setup_eventoDeportivo():
  fiveconfigure.debug_mode = True
  import zassh.eventoDeportivo
  zcml.load_config('configure.zcml', zassh.eventoDeportivo)
  fiveconfigure.debug_mode = False

  # Let Zope know about the product we require above-and-beyond a basic
  # Plone install (PloneTestCase takes care of these).
  ZopeTestCase.installProduct(PROJECTNAME)  # PROJECTNAME =

# Import PloneTestCase - this registers more products with Zope as a side effect
from Products.PloneTestCase.PloneTestCase import PloneTestCase
from Products.PloneTestCase.PloneTestCase import setupPloneSite

# Set up a Plone site

class eventoDeportivoTestCase(PloneTestCase):
  """Base class for integration tests for the 'eventoDerpotivo'
product. This may
  provide specific set-up and tear-down operations, or provide convenience

But when running the tests from a buildout, ZopeTestCase can't install
the zassh.eventoDeportivo product:

[EMAIL PROTECTED] trunk $ bin/instance test -s zassh.eventoDeportivo
Running tests at level 1
Installing CMFCore ... done (0.013s)
Installing kupu ... done (0.031s)
Running Products.PloneTestCase.layer.PloneSite tests:
 Set up Products.PloneTestCase.layer.ZCML in 1.958 seconds.
Installing zassh.eventoDeportivo ... NOT FOUND

and obviously all my tests fail.

PPD uses ztc.installPackage instead of ztc.installProduct, but the
installPackage method isn't availabe in Zope-2.9.8-final, which I'm
using with Plone-2.5.3. [1]

My question was:
 Is possible to install eggified products in zope-2.9.8 using
ZopeTestCase? If so, what's wrong in my base.py file?

Thanks in advance.

[1] http://www.archivum.info/[EMAIL PROTECTED]/2007-06/msg00100.html

Israel Saeta Pérez
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to