#22369 closed New feature (fixed)

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

Reported by: anonymous Owned by: jrothenbuhler
Component: Testing framework Version: master
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 Changed 17 months ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from Times a template is used using assertTemplateUsed to Add ability to assert number of times a template is used for assertTemplateUsed
  • Triage Stage changed from Unreviewed to Accepted
  • Version changed from 1.6 to master

comment:2 Changed 17 months ago by jrothenbuhler

  • Owner changed from nobody to jrothenbuhler
  • Status changed from new to assigned

comment:3 Changed 17 months ago by jrothenbuhler

  • Has patch set

comment:4 Changed 17 months ago by charettes

  • Patch needs improvement set

comment:5 Changed 17 months ago by Simon Charette <charette.s@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In 17c18844561431aabed89c3bd48de951db7d13ab:

Fixed #22369 -- Added count parameter to assertTemplateUsed

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