File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -137,11 +137,23 @@ def test_lazyobject_eval(self):
137137 DEBUG = True , DEBUG_TOOLBAR_PANELS = ["debug_toolbar.panels.templates.TemplatesPanel" ]
138138)
139139class JinjaTemplateTestCase (IntegrationTestCase ):
140- @expectedFailure
141140 def test_django_jinja2 (self ):
142141 r = self .client .get ("/regular_jinja/foobar/" )
143142 self .assertContains (r , "Test for foobar (Jinja)" )
144- self .assertContains (r , "<h3>Templates (2 rendered)</h3>" )
143+ # This should be 2 templates because of the parent template.
144+ # See test_django_jinja2_parent_template_instrumented
145+ self .assertContains (r , "<h3>Templates (1 rendered)</h3>" )
146+ self .assertContains (r , "<small>basic.jinja</small>" )
147+
148+ @expectedFailure
149+ def test_django_jinja2_parent_template_instrumented (self ):
150+ """
151+ When Jinja2 templates are properly instrumented, the
152+ parent template should be instrumented.
153+ """
154+ r = self .client .get ("/regular_jinja/foobar/" )
155+ self .assertContains (r , "Test for foobar (Jinja)" )
156+ self .assertContains (r , "<h3>Templates (1 rendered)</h3>" )
145157 self .assertContains (r , "<small>basic.jinja</small>" )
146158
147159
You can’t perform that action at this time.
0 commit comments