#15179: django.test.client.Client.login fake HttpRequest is not run through middlewares -----------------------------------+-------------------------------------- Reporter: Ciantic | Owner: akaariai Type: Bug | Status: new Component: Testing framework | Version: 1.7-beta-2 Severity: Release blocker | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -----------------------------------+--------------------------------------
Comment (by marfire): Agreed, I like the approach in Loic's patch. There's still an inherent tension here - anything that uses `Client.login()` is going to end up inadvertently testing the user's middleware. That seems OK to me, since I imagine that any test that uses `Client.login()` is going to end up making another request as well, so the middleware will be exercised in either case. My imagination is limited, however. :-) Given where we are in the cycle (and Aymeric's objections), I would lean towards reverting this in 1.7 and taking Loic's approach going forward. -- Ticket URL: <https://code.djangoproject.com/ticket/15179#comment:39> 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 unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.6b42fce92ac0ced1b853a521e24e24f3%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.