pytest-dev / pytest-dev/pytest-django

enable_db_access_for_all_tests how to make it work for all databases in multi databases setup?

Open
#945 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.5k
Forks
367
PR merge metrics
No merged PRs in 30d

Description

I tried with markers in different places in conftest - nothing helps.

If markers in individual test files that do use second db - everything work.

If there is no markers in test file that use only main db - everything works in this test file.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the conftest configuration and marker placement described in the report, reproducing the behavior in a multi-database setup. Compare a test file using the second database with one using only the main database; done means database access works for all relevant tests without per-file markers.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
databases, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.