#24987: django.test.client.Client.login() rejects user with is_active=False -------------------------------------+------------------------------------- Reporter: jdufresne | Owner: nobody Type: Bug | Status: new Component: Testing framework | Version: master Severity: Normal | Resolution: Keywords: | Triage Stage: | Someday/Maybe Has patch: 1 | Needs documentation: 1 Needs tests: 1 | Patch needs improvement: 1 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by MarkusH):
* needs_docs: 0 => 1 * needs_better_patch: 0 => 1 * needs_tests: 0 => 1 * stage: Unreviewed => Someday/Maybe Comment: I tend to follow Claude's reasoning in #19792. I, personally expect `client.login()` to behave like `contrib.auth.login()`, thus checking for `is_active=True`. I see your point though. However, your current change is backwards incompatible and will break many users' tests. I therefore don't consider it a bug but a feature request. One idea that comes to mind, of how to solve the problem in a backwards compatible manner, would be a flag on the client `check_is_active=True` that would allow to bypass the check. -- Ticket URL: <https://code.djangoproject.com/ticket/24987#comment:4> 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/067.12e2792a9b2e60c247a965abbd8f3a49%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.