mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #34657 -- Made assertInHTML() use unparsed needle in error messages.
This commit is contained in:
committed by
Mariusz Felisiak
parent
6ad0dbc8d9
commit
e99c7d8847
@@ -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"}'
|
||||
|
||||
Reference in New Issue
Block a user