SimpleTestCase.assertContains(response, text, count=None, status_code=200, msg_prefix='', html=False)
[source]
Asserts that a Response
instance produced the given status_code
and that text
appears in the content of the response. If count
is provided, text
must occur exactly count
times in the response.
Set html
to True
to handle text
as HTML. The comparison with the response content will be based on HTML semantics instead of character-by-character equality. Whitespace is ignored in most cases, attribute ordering is not significant. See assertHTMLEqual()
for more details.
Please login to continue.