Opened 10 years ago

Closed 10 years ago

#22369 closed New feature (fixed)

Add ability to assert number of times a template is used for assertTemplateUsed

Reported by: anonymous Owned by: Jake Rothenbuhler
Component: Testing framework Version: dev
Severity: Normal Keywords: assert, testing
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

For instance, using django-autocomplete-light a template from this package is used for each field where you define as an autocomplete field. It'd be nice can check for the times the template is used:

SimpleTestCase.assertTemplateUsed(response, template_name, count=1, msg_prefix=)

Change History (5)

comment:1 by Tim Graham, 10 years ago

Summary: Times a template is used using assertTemplateUsedAdd ability to assert number of times a template is used for assertTemplateUsed
Triage Stage: UnreviewedAccepted
Version: 1.6master

comment:2 by Jake Rothenbuhler, 10 years ago

Owner: changed from nobody to Jake Rothenbuhler
Status: newassigned

comment:3 by Jake Rothenbuhler, 10 years ago

Has patch: set

comment:4 by Simon Charette, 10 years ago

Patch needs improvement: set

comment:5 by Simon Charette <charette.s@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In 17c18844561431aabed89c3bd48de951db7d13ab:

Fixed #22369 -- Added count parameter to assertTemplateUsed

Note: See TracTickets for help on using tickets.
Back to Top