MCPcopy
hub / github.com/django/django / assert_and_parse_html

Function assert_and_parse_html

django/test/testcases.py:94–100  ·  view source on GitHub ↗
(self, html, user_msg, msg)

Source from the content-addressed store, hash-verified

92
93
94def assert_and_parse_html(self, html, user_msg, msg):
95 try:
96 dom = parse_html(html)
97 except HTMLParseError as e:
98 standardMsg = "%s\n%s" % (msg, e)
99 self.fail(self._formatMessage(user_msg, standardMsg))
100 return dom
101
102
103class _AssertNumQueriesContext(CaptureQueriesContext):

Callers 4

_assert_containsMethod · 0.85
assertHTMLEqualMethod · 0.85
assertHTMLNotEqualMethod · 0.85
assertInHTMLMethod · 0.85

Calls 1

parse_htmlFunction · 0.90

Tested by

no test coverage detected