MCPcopy
hub / github.com/django/django / test_count_msg_prefix

Method test_count_msg_prefix

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

Source from the content-addressed store, hash-verified

1086 )
1087
1088 def test_count_msg_prefix(self):
1089 msg = (
1090 "2 != 1 : Prefix: Found 2 instances of '<b>Hello</b>' (expected 1) in the "
1091 "following response\n'<b>Hello</b><b>Hello</b>'"
1092 ""
1093 )
1094 with self.assertRaisesMessage(AssertionError, msg):
1095 self.assertInHTML(
1096 "<b>Hello</b>",
1097 "<b>Hello</b><b>Hello</b>",
1098 count=1,
1099 msg_prefix="Prefix",
1100 )
1101
1102 def test_base(self):
1103 haystack = "<p><b>Hello</b> <span>there</span>! Hi <span>there</span>!</p>"

Callers

nothing calls this directly

Calls 2

assertRaisesMessageMethod · 0.80
assertInHTMLMethod · 0.80

Tested by

no test coverage detected