diff --git a/django/test/testcases.py b/django/test/testcases.py
index 2f8acad..6eca030 100644
a
|
b
|
class TransactionTestCase(unittest.TestCase):
|
347 | 347 | def assertContains(self, response, text, count=None, status_code=200, |
348 | 348 | msg_prefix=''): |
349 | 349 | """ |
350 | | Asserts that a response indicates that a page was retrieved |
| 350 | Asserts that a response indicates that a page/content was retrieved |
351 | 351 | successfully, (i.e., the HTTP status code was as expected), and that |
352 | 352 | ``text`` occurs ``count`` times in the content of the response. |
353 | 353 | If ``count`` is None, the count doesn't matter - the assertion is true |
… |
… |
class TransactionTestCase(unittest.TestCase):
|
357 | 357 | msg_prefix += ": " |
358 | 358 | |
359 | 359 | self.assertEqual(response.status_code, status_code, |
360 | | msg_prefix + "Couldn't retrieve page: Response code was %d" |
| 360 | msg_prefix + "Couldn't retrieve content: Response code was %d" |
361 | 361 | " (expected %d)" % (response.status_code, status_code)) |
362 | 362 | text = smart_str(text, response._charset) |
363 | 363 | real_count = response.content.count(text) |
… |
… |
class TransactionTestCase(unittest.TestCase):
|
372 | 372 | def assertNotContains(self, response, text, status_code=200, |
373 | 373 | msg_prefix=''): |
374 | 374 | """ |
375 | | Asserts that a response indicates that a page was retrieved |
| 375 | Asserts that a response indicates that a page/content was retrieved |
376 | 376 | successfully, (i.e., the HTTP status code was as expected), and that |
377 | 377 | ``text`` doesn't occurs in the content of the response. |
378 | 378 | """ |
… |
… |
class TransactionTestCase(unittest.TestCase):
|
380 | 380 | msg_prefix += ": " |
381 | 381 | |
382 | 382 | self.assertEqual(response.status_code, status_code, |
383 | | msg_prefix + "Couldn't retrieve page: Response code was %d" |
| 383 | msg_prefix + "Couldn't retrieve content: Response code was %d" |
384 | 384 | " (expected %d)" % (response.status_code, status_code)) |
385 | 385 | text = smart_str(text, response._charset) |
386 | 386 | self.assertEqual(response.content.count(text), 0, |