MCPcopy Index your code
hub / github.com/django/django / test_assert_not_in_html_msg_prefix

Method test_assert_not_in_html_msg_prefix

tests/test_utils/tests.py:1144–1151  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1142 self.assertNotInHTML("<b>Hello</b>", haystack=haystack)
1143
1144 def test_assert_not_in_html_msg_prefix(self):
1145 haystack = "<p>Hello</p>"
1146 msg = (
1147 "1 != 0 : Prefix: '<p>Hello</p>' unexpectedly found in the following "
1148 f"response\n{haystack!r}"
1149 )
1150 with self.assertRaisesMessage(AssertionError, msg):
1151 self.assertNotInHTML("<p>Hello</p>", haystack=haystack, msg_prefix="Prefix")
1152
1153
1154class JSONEqualTests(SimpleTestCase):

Callers

nothing calls this directly

Calls 2

assertRaisesMessageMethod · 0.80
assertNotInHTMLMethod · 0.80

Tested by

no test coverage detected