From 9a09b96e5ee4fcb17a427fefdc34557c2bafd24f Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Fri, 20 Jul 2018 13:56:34 -0700 Subject: [PATCH] Print template names rather than objects --- flask_testing/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flask_testing/utils.py b/flask_testing/utils.py index 7362c40..617bd7b 100644 --- a/flask_testing/utils.py +++ b/flask_testing/utils.py @@ -244,9 +244,9 @@ class attribute name which contains the provided ``name`` value. if getattr(template, tmpl_name_attribute) == name: return True - used_templates.append(template) + used_templates.append(template.name) - raise AssertionError("Template %s not used. Templates were used: %s" % (name, ' '.join(repr(used_templates)))) + raise AssertionError("Template %s not used. Templates used: %r" % (name, used_templates)) assert_template_used = assertTemplateUsed