[Product-Developers] Thinking about CMF site fixture/layer for plone.testing
Jens W. Klein
jens at bluedynamics.com
Wed May 23 10:22:09 UTC 2012
On 2012-05-10 18:24, Sean Upton wrote:
> I'm using a homegrown CMF site fixture/layer with plone.testing for
> testing add-ons that require CMF but not Plone (and possibly also are
> non-GPL e.g. MIT/BSD/ZPL type licenses). What I have done thus far is
> minimal -- just the tiny bits I need to test: create a site class
> subclassing Products.CMFCore.PortalObject.PoralObjectBase, and add a
> portal_catalog to that site, and this runs inside a layer based on
> plone.testing.z2.STARTUP.
>
> This seems useful to me because it gives me a way of resolving items
> in a site via a catalog, and it gives me a persistent component
> registry to test against. It also is much faster to set up and tear
> down than a fully-blown Plone site, which is advantageous for packages
> that have minimal coupling with Plone.
>
> Is this something that might (eventually) be useful to others as an
> added layer in plone.testing itself (assuming another optional extra
> called 'cmf', and a layer resource called 'site')?
>
> If so, what OOTB CMF tools and fixtures would you want in a CMF site
> fixture for testing?
>
> Also, is there any point in using / requiring CMFDefault if a fixture
> based on CMFCore will suffice? My goal would be only adding extra
> dependency on CMFCore only.
>
> Thoughts?
>
> Sean
Big +1 - I just looked at the tests for Products.PlonePAS which should
not depend on the whole Plone stack, but on a CMFSite with PAS activated.
I do not think CMFDefault should be part of the base.
It me would it would be helpful to have additional fixtures available
with GenericSetup and PluggableAuthService. otoh its easy to add this
when a CMFSite fixture is already there.
regards Jens
--
Klein & Partner KG, member of BlueDynamics Alliance
More information about the Product-Developers
mailing list