test.SimpleTestCase.assertNotContains()

SimpleTestCase.assertNotContains(response, text, status_code=200, msg_prefix='', html=False) [source]

Asserts that a Response instance produced the given status_code and that text does not appear in the content of 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.

doc_Django
2016-10-09 18:40:05
Comments
Leave a Comment

Please login to continue.