#11505: Django's TestCase should reset the cache -------------------------------------+------------------------------------- Reporter: andrewfong | Owner: Type: New feature | andrewfong Component: Testing framework | Status: assigned Severity: Normal | Version: SVN Keywords: cache testing flush | Resolution: Has patch: 1 | Triage Stage: Accepted Needs tests: 0 | Needs documentation: 1 Easy pickings: 0 | Patch needs improvement: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by jsdalton):
* needs_better_patch: 1 => 0 Comment: Adding a new patch for this, which extends the modified cache approach to cache middleware. I had noticed on some of my projects that certain tests were failing when using cache middleware, which turned out to be because the cache was returning the response and thus the context was not included in the response to the test client. Tests reproducing this error state as well as a fix are included in the latest patch. The full test suite passes as well (minus 5 unrelated failures that are on trunk right now). The failures to me are a good illustration of why this patch is important. The system should ideally be as clean as possible in between each test; cache values carrying over from test to test create problematic behavior when a full test suite is run. I might post again to the dev list if there's no movement on this. If anyone on the CC list here would like to review this patch and give any feedback please do so. At this point, all that's really required from what I can see is a few notes in the documentation. -- Ticket URL: <https://code.djangoproject.com/ticket/11505#comment:11> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.