Is there a way to change the PLONE_SITE_ID
from its default at plone.app.testing.interfaces
without modifying the source code?
I'm using Plone 4 with several custom products, and plone.app.testing
(4.0.2) with relative success. In my custom products, there are several instances where there are hardcoded physical paths to locate objects when performing catalog searches (e.g., my site root is 'mySiteID', so several custom queries use path=/mySiteID/folder1/etc..
to do catalog searches).
The problem is that the site root in the Plone instance that plone.app.testing
configures (PLONE_FIXTURE
) is PLONE_SITE_ID = 'plone'
. Therefore, any objects that I add in my tests always have /plone
as the root rather than /mySiteID
and my tests break. I can fix this problem by changing the defined value in the interface but this seems like an ugly hack.