File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -192,21 +192,20 @@ def test_long_unbroken_string_in_report_field(self):
192192 def test_report_base_css_has_overflow_wrap (self ):
193193 """The report base template must include overflow-wrap for text wrapping."""
194194 template = self .django_engine .get_template ("report_base.html" )
195- # Render with minimal context to get the CSS
196- html = template .render ({"report_name" : "Test" })
195+ source = template .template .source
197196
198- self .assertIn ("overflow-wrap: break-word" , html )
197+ self .assertIn ("overflow-wrap: break-word" , source )
199198
200199 def test_report_base_css_styles_nested_pre (self ):
201200 """
202201 The report base CSS must style .report-field pre to prevent
203202 nested <pre> elements from breaking out of margins.
204203 """
205204 template = self .django_engine .get_template ("report_base.html" )
206- html = template .render ({ "report_name" : "Test" })
205+ source = template .template . source
207206
208- self .assertIn (".report-field pre" , html )
209- self .assertIn ("overflow-wrap: break-word" , html )
207+ self .assertIn (".report-field pre" , source )
208+ self .assertIn ("overflow-wrap: break-word" , source )
210209
211210 def test_raw_request_pre_tags_preserved (self ):
212211 """
You can’t perform that action at this time.
0 commit comments