pytest-dev / pytest-dev/pytest-django

A new fixture for using "real database"?

Open
#1,132 0 comments 0 reactions 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

The documentation indicates we can use django_db_blocker to unblock database access and enable tests to utilize a real database. Alternatively we can implement django_db_setup to use a real database.

Is it possible to add a fixture analogous to db or transactional_db to indicate "use a real external database"? Something like external_db?

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 by reading the linked django_db_blocker and django_db_setup documentation, then inspect how the existing db and transactional_db fixtures are defined and used. Determine whether an external_db fixture has a clear lifecycle and configuration boundary; done would include an agreed fixture design, implementation, and coverage for external database usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
database, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.