Model mocking support
Writing unit tests is hard mainly because of how tight are Models coupled to database. Being able to mock Models in a way that one could run tests entirely in memory (giving far better performance then even in-memory sqlite as one must not handle rollbacks and stuff) would be really helpful.
Main problem to solve are foreign keys and contenttype framework handling. Solution could probably be some kind of mocking backend that do not support any database operations except for creation (and providing ID from in-memory generator) and primary-key retrieval (from stored dictionary).
Change History
(8)
Triage Stage: |
Unreviewed → Accepted
|
Severity: |
→ Normal
|
Type: |
→ New feature
|
Triage Stage: |
Accepted → Someday/Maybe
|
Resolution: |
→ needsinfo
|
Status: |
new → closed
|
I know this is low priority and someday/maybe request, but I was ask to store the idea during EDC sprints.