Skip to content

durable fails pytest tests without a database #126

@samueljsb

Description

@samueljsb

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.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions