When when using pytest-django, tests must be allow-listed to access a database. get_transaction_state (and its users, like durable) fails if run in tests that are not allowed to access the database (because they are not using the django_db marker or fixture) if there were other tests in the same process that had opened connections to the database.
When when using
pytest-django, tests must be allow-listed to access a database.get_transaction_state(and its users, likedurable) fails if run in tests that are not allowed to access the database (because they are not using thedjango_dbmarker or fixture) if there were other tests in the same process that had opened connections to the database.Note
We addressed this at Kraken internally in https://github.com/octoenergy/kraken-core/commit/a4546fe4de9902e651da030992e8c2ecdc1e9d95, which didn't merge before this project was extracted.