(self)
| 1100 | ) |
| 1101 | |
| 1102 | def test_base(self): |
| 1103 | haystack = "<p><b>Hello</b> <span>there</span>! Hi <span>there</span>!</p>" |
| 1104 | |
| 1105 | self.assertInHTML("<b>Hello</b>", haystack=haystack) |
| 1106 | msg = f"Couldn't find '<p>Howdy</p>' in the following response\n{haystack!r}" |
| 1107 | with self.assertRaisesMessage(AssertionError, msg): |
| 1108 | self.assertInHTML("<p>Howdy</p>", haystack) |
| 1109 | |
| 1110 | self.assertInHTML("<span>there</span>", haystack=haystack, count=2) |
| 1111 | msg = ( |
| 1112 | "Found 1 instances of '<b>Hello</b>' (expected 2) in the following response" |
| 1113 | f"\n{haystack!r}" |
| 1114 | ) |
| 1115 | with self.assertRaisesMessage(AssertionError, msg): |
| 1116 | self.assertInHTML("<b>Hello</b>", haystack=haystack, count=2) |
| 1117 | |
| 1118 | def test_long_haystack(self): |
| 1119 | haystack = ( |
nothing calls this directly
no test coverage detected