Allow assertContains to check for existence, without count
|Reported by:||Owned by:||Adrian Holovaty|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I was a little surprised by the fact that django.test.testCase.assertContains does not cover the case where we want to make sure the content contains the text, but we do not care about the count. To me, this is the most common use case.
I suggest that this is made the default behavior (slightly changing functionality, by making the assertion less strict if no count is given).
I have attached a patch against trunk rev 5646. I did not write testcases, since none existed for the existing behavior.