pytest-dev / pytest-dev/pytest-django

Fixtures that save to database silently pass if they don't use the "db" fixture

Open
#173 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This is very annoying as you don't have clear indication of why your fixture doesn't work. Any database changing actions done in a fixture that doesn't depend on db/transactional_db should raise clear errors indicating the problem.

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 locating how pytest-django handles the db and transactional_db fixtures and database access from fixtures. Reproduce a database-changing fixture without either dependency, then identify the existing error-reporting path. Done means such actions raise a clear error explaining the missing fixture dependency.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.