- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn if developer tries to commit transaction in an integration testing layer #6
Comments
This is in |
not sure, but ... i came across this years later - obviously - and stumbled a lot. the error tells me the testisolation is broken ... ok. as this error depends on which layer i use - FunctionalTesting or IntegrationTesting, it would be awesome if there would be a hint like "use a functional test", as @davisagli stated. i came across this issue searching for docs about transaction.commit() and testisolation and nothing i found dipped my nose into a pile of wisdom, except for this closed issue. but i don't know if this is an issue for plone.app.testing or plone.testing. |
At the time, I apparently thought the message was clear. But it can indeed be clearer. Currently it says:
We could mention the options of removing the transaction commit or use a functional layer. This would need a change in Could you create a PR? |
@mauritsvanrees not right at this moment, but i will fix this asap. thank you pointing me to the code-parts! <3 |
Tell them to use a functional layer instead.
We can do this by patching transaction.commit or by adding a transaction resource manager that always fails on commit. Whatever we set up in the integration layer, the functional layer needs to take down.
The text was updated successfully, but these errors were encountered: