#35481: assertTemplateUsed false positive
-----------------------------------+--------------------------------------
Reporter: Shiva Kumar | Owner: nobody
Type: Bug | Status: closed
Component: Testing framework | Version: dev
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Natalia Bidart):
* resolution: => invalid
* status: new => closed
Comment:
Hello Shiva Kumar,
Thank you for your report, and helping make Django better.
Django's testing framework, like many parts of the framework, relies
heavily on the dynamic nature of Python. This dynamic nature means that
functions can often be used in multiple ways, as you pointed out. While
Django provides a lot of built-in validations and utilities, it cannot
cover every possible misuse case. Enforcing stricter checks or keyword-
only arguments could reduce some flexibility and introduce backward
compatibility issues.
In my opinion, the docs are clear about the correct usage of
`assertTemplateUsed`. It says:
> response must be a response instance returned by the test client.
Given the above, I'll close the ticket accordingly, but if you disagree,
you can consider starting a new conversation on the
[https://forum.djangoproject.com/c/internals/5 Django Forum], where you'll
reach a wider audience.
--
Ticket URL: <https://code.djangoproject.com/ticket/35481#comment:1>
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018fba728aae-23da5234-72d4-49da-9f05-2be188954f8d-000000%40eu-central-1.amazonses.com.