'Asserts that a response indicates that some content was retrieved
successfully, (i.e., the HTTP status code was as expected), and that
``text`` doesn\'t occurs in the content of the response.'

def assertNotContains(self, response, text, status_code=200, msg_prefix=''):

    if msg_prefix:
        msg_prefix += ':    '
    self.assertEqual(response.status_code, status_code, (msg_prefix + ("Couldn't    retrieve    content:    Response    code    was    %d    (expected    %d)" % (response.status_code, status_code))))
    text = smart_str(text, response._charset)
    self.assertEqual(response.content.count(text), 0, (msg_prefix + ("Response    should    not    contain    '%s'" % text)))
