Code review comment for lp:~wgrant/launchpad/fix-duplicate-harness-zcml

Revision history for this message
William Grant (wgrant) wrote :

canonical.database.harness._get_locals calls execute_zcml_for_scripts, then executes script.zcml itself. Unfortunately, execute_zcml_for_scripts executes script.zcml itself, so all the ZCML is loaded twice. This means that "make harness" has duplicate subscriber registrations, causing calls like factory.makeBug() to fail with unique constraint violations.

To fix this, I've removed the direct execution of script.zcml.

To QA, verify that factory.makeBug() works in "make harness".

« Back to merge proposal