#33400: assertTemplateUsed as context manager does not respect count parameter
---------------------------------------------+------------------------
Reporter: karyon | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 4.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+------------------------
See
[https://github.com/django/django/blob/cb383753c0e0eb52306e1024d32a782549c27e61/django/test/testcases.py#L659
the code of assertTemplateUsed]: if it's used as a context manager, the
count parameter is entirely unused. The
[https://docs.djangoproject.com/en/4.0/topics/testing/tools/#django.test.SimpleTestCase.assertTemplateUsed
documentation on assertTemplateUsed] does not mention that.
The context manager capability was added in
[https://github.com/django/django/commit/a678e9ea65 a678e9ea65] 10 years
ago. The count parameter was added in
[https://github.com/django/django/commit/17c18844561431aabed89c3bd48de951db7d13ab
#diff-7833da5b45a68d00834388d97dd5c4413e3796497c7bc5e0cc2621b08a2d0df1R543
17c188445] 8 years ago.
--
Ticket URL: <https://code.djangoproject.com/ticket/33400>
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/049.3b5823188114772ffeb6d724beec1c94%40djangoproject.com.