Database fixtures considered harmful.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- content, documentation
Research direction
No files, tests, or entry points are named; start by reviewing the website's existing article structure and the proposed fixture examples in this issue. Done means publishing an article that explains the database-fixture concerns, the dependencies and @value approach, and the trade-offs for existing FactoryBoy usages.
Written by the indexing model from the issue text.
Description
An article about better test fixtures
dependenciescan turnstoriesbusiness objects into pytest fixtures.- We will write better tests because our database fills up logic does not duplicate in
FactoryBoy. @valuedecorator can be used to return normal results from the factories.
@register
class SubmitCodeFixture(SubmitCode):
name = 'submit_code'
@value
def fixture(submit_code, user, token):
return submit_code(user, token)
user = require('request_code')
token = Faker('uuid')
- profit: Tests coupled with business logic will fail if this logic changes. On the other side, we'll need to change each
FactoryBoyusage in our test suite to mirror actual behavior.
- Dominant language
- HTML
- Stars
- 10
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dry-python/dry-python.github.io
-
blog
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
blog
Difficulty 5/5 Over a week Newbie friendliness 10/100
-
blog
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Add rich preview. Opendesign feature
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
blog
Difficulty 5/5 Over a week Newbie friendliness 20/100
All issues in dry-python/dry-python.github.io
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
NousResearch/hermes-agent#119856 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
openclaw-en
Difficulty 1/5 Under an hour Newbie friendliness 85/100
duanyytop/agents-radar#3441 ·