def template_used(response, template_name):
 templates = []
 templates += [t.name for t in getattr(response, 'templates', [])]
 templates += getattr(response, 'jinja_templates', [])
 return (template_name in templates)

def template_used ( response , template_name ) : templates = [ ] templates += [ t . name for t in getattr ( response , 'templates' , [ ] ) ] templates += getattr ( response , 'jinja_templates' , [ ] ) return ( template_name in templates )
asserts a given template was used first off .