[Zope3-dev] IAdding

Shane Hathaway shane at hathawaymix.org
Fri Nov 12 17:56:19 EST 2004


On Fri, November 12, 2004 3:46 pm, Stephan Richter said:
> On Friday 12 November 2004 17:26, Shane Hathaway wrote:
>> On Fri, November 12, 2004 9:47 am, Jim Fulton said:
>> > I'm not sure it would swally the right exception anyway.  I suggest
>> > adding a haveAdding method to the contents view and then have the
>> > template use that.
>>
>> I've done this, and now I'm working on a functional test for my fix.
>>  For
>> my test, I'd like to add some ZCML that will take effect only when
>> running
>> functional tests.  Is there a way to do that?
>
> Yeah, there is a ftesting.zcml that you can add a ZCML file to which is
> only
> to be loaded for ftests.

Unfortunately, ftesting.zcml (at the Zope 3 root) seems to be very
general, while I'm working on something very specific to
zope.app.container.browser.ftests.  To solve this, I'm thinking about
adding a new class of directives to package-includes.  I want to add the
following directive to the existing ftesting.zcml:

  <include files="package-includes/*-ftesting.zcml" />

Then, I'll add a file called zope.app.container.browser-ftesting.zcml to
package-includes.  Its content:

<include package="zope.app.container.browser.ftests" />

Finally, I'll add my directive to a new configure.zcml in the ftests
package.  Does that sound like a good plan?  Am I missing anything?

Shane




More information about the Zope3-dev mailing list