#18057 closed Cleanup/optimization (fixed)
Docs should say that caches are not cleared after each test
Reported by: | Thomas Güttler | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | hv@…, albrecht.andi@…, timograham@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Caches are not cleared after each test, and running "manage.py test fooapp" can insert wrong data into the cache of a live system.
The current behavior should be documented here:
https://docs.djangoproject.com/en/dev/topics/testing/
I think it is imporant to state this, since tests use a temporary database and flush the database for each test.
Related Ticket: #16401 and #11505 (Cache should be reset after each test without flushing)
Attachments (1)
Change History (8)
comment:1 by , 13 years ago
Description: | modified (diff) |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
follow-up: 5 comment:2 by , 12 years ago
comment:3 by , 12 years ago
Cc: | added |
---|
by , 12 years ago
Attachment: | 18057.diff added |
---|
comment:4 by , 12 years ago
Cc: | added |
---|---|
Has patch: | set |
comment:5 by , 12 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Replying to aalbrecht:
Is this really just a documentation bug? I would expect that the cache is cleared between each test - just like the database too.
see #11505
Until someone can champion and shepherd that ticket through to a resolution, this note in the docs seems the right thing to do. The issue looks close to a resolution, but I have not reviewed it.
comment:6 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Is this really just a documentation bug? I would expect that the cache is cleared between each test - just like the database too.