Conversation
Bump pytest-plone to >=1.1.0. The new keep_session=True default keeps all registered layer sessions pinned at once, which exposed a duplicate Plone site collision: the acceptance layer pulled in the stock PLONE_FIXTURE (via plone.app.robotframework's REMOTE_LIBRARY_BUNDLE_FIXTURE), whose default setUpDefaultContent creates a site with id "plone" -- the same id our CoreFixture already creates. Re-parent a locally-built remote-library bundle onto kitconcept_FIXTURE (new testing/robot.py holding RF_LIBRARIES) so the stock PLONE_FIXTURE is no longer in the base chain. Also rename the distribution fixture to distribution_name and make create_site idempotent. GitLab: https://gitlab.kitconcept.io/kitconcept/distribution-kitconcept-intranet/-/issues/462
sneridagh
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Upgrade
pytest-ploneto>=1.1.0and adapt the test layer setup to the new release.GitLab issue: https://gitlab.kitconcept.io/kitconcept/distribution-kitconcept-intranet/-/issues/462
Why
pytest-plone1.1.0 changedfixtures_factoryto default tokeep_session=True, which pins every registered layer's session-scoped fixture for the whole test session instead of tearing it down around each function-style test.Because our
conftest.pyregisters theacceptance,functionalandintegrationlayers, this kept them all set up simultaneously — and exposed a latent Plone site id collision:plone.app.testing.PLONE_FIXTUREtransitively, viaplone.app.robotframework'sREMOTE_LIBRARY_BUNDLE_FIXTURE(bases=(PLONE_FIXTURE,)).PLONE_FIXTURE.setUpDefaultContentcreates a Plone site with the default idplone.CoreFixturealso creates a site withsite_id="plone".With both sessions kept alive at once, the second site creation failed with
BadRequest: The id "plone" is invalid - it is already in use.How
pytest-plonepin to>=1.1.0inbackend/pyproject.toml(+uv.lock).backend/src/kitconcept/core/testing/robot.pyexposingRF_LIBRARIES(the robot remote-library tuple).REMOTE_LIBRARY_BUNDLE_FIXTURElocally withbases=(kitconcept_FIXTURE,)so it rides on our kitconcept site instead of the stockPLONE_FIXTURE.RemoteLibraryLayeritself creates no site — it only attaches remote libraries toPloneSite— so re-parenting is safe.keep_session=True.distributionfixture todistribution_nameand makecreate_siteidempotent (drop a pre-existing site id before recreating).Test plan
make test/uv run pytestinbackend/— 288 passed.Local Results
x5.8 improvement: