Problem
There is no factory pattern for generating model instances or realistic test data. Seeding is written by hand.
Proposal
Model factories:
- Factory classes bound to models with a
definition() returning attributes.
- Faker integration for realistic values.
- States (named attribute overrides), relationship helpers, and
count() for batches.
- Usable from both tests and seeders.
make:factory command + stub.
Scope
Factory base, discovery/registry, states, relationships, faker, command + stub.
Definition of Done
Problem
There is no factory pattern for generating model instances or realistic test data. Seeding is written by hand.
Proposal
Model factories:
definition()returning attributes.count()for batches.make:factorycommand + stub.Scope
Factory base, discovery/registry, states, relationships, faker, command + stub.
Definition of Done
pytestcovers single/batch creation, states, and relationships (suite green).