mirror of
https://github.com/django/django.git
synced 2025-11-24 21:00:12 +00:00
Refs #34657 -- Made assertInHTML() use unparsed needle in error messages.
This commit is contained in:
parent
6ad0dbc8d9
commit
e99c7d8847
3 changed files with 11 additions and 3 deletions
|
|
@ -983,6 +983,13 @@ class HTMLEqualTests(SimpleTestCase):
|
|||
)
|
||||
|
||||
|
||||
class InHTMLTests(SimpleTestCase):
|
||||
def test_needle_msg(self):
|
||||
msg = "False is not true : Couldn't find '<b>Hello</b>' in response"
|
||||
with self.assertRaisesMessage(AssertionError, msg):
|
||||
self.assertInHTML("<b>Hello</b>", "<p>Test</p>")
|
||||
|
||||
|
||||
class JSONEqualTests(SimpleTestCase):
|
||||
def test_simple_equal(self):
|
||||
json1 = '{"attr1": "foo", "attr2":"baz"}'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue