test_runner: Fix template rendering test.

The previous logic would allow the same template to be added to both
the shallow_tested list and the normal list.
This commit is contained in:
Tim Abbott 2016-11-30 16:00:26 -08:00
parent 5e0d2c4e1b
commit f8f017c221
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ class Runner(DiscoverRunner):
if hasattr(sender, 'template'):
template_name = sender.template.name
if template_name not in self.templates_rendered:
if context.get('shallow_tested'):
if context.get('shallow_tested') and template_name not in self.templates_rendered:
self.shallow_tested_templates.add(template_name)
else:
self.templates_rendered.add(template_name)