Skip to content

customActions from plone.supermodel are being called before all config are done when using plone.app.testing #39

Description

@idgserpro

This happened in collective.cover's PR after Plone 4.3.12 release.

Using Plone 4.3.11, collective.cover tests were working. They stopped working in 4.3.12. We detected (by doing a pdb in supermodel finalizeSchema) that the cause is cover's supermodel fields that aren't "loaded". supermodel needs to execute a customAction after all zcml are loaded. For some zcml dependency we didn't detected yet, in Plone 4.3.12, supermodel is loaded along packages that plone.app.testing loads. At that moment, cover's zcml isn't loaded yet so supermodel's customAction don't consider cover configurations, giving the error.

When bin/instance is called, xmlconfig.file is called only one time. When bin/test is called, xmlconfig.file is called for each package in products. So the customActions are executed multiple times in bin/test making customActions of supermodel being executed before collective.cover's configuration.

We don't know which package in

caused the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions