Django

Code

Changeset 5739

Show
Ignore:
Timestamp:
07/20/07 23:36:28 (1 year ago)
Author:
russellm
Message:

Minor fix to allow for count=0 in assertContains.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/test/testcases.py

    r5731 r5739  
    8585                (response.status_code, status_code)) 
    8686        real_count = response.content.count(text) 
    87         if count
     87        if count is not None
    8888            self.assertEqual(real_count, count, 
    8989                "Found %d instances of '%s' in response (expected %d)" % (real_count, text, count))