1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #16921 -- Added assertHTMLEqual and assertHTMLNotEqual assertions, and converted Django tests to use them where appropriate. Thanks Greg Müllegger.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Carl Meyer
2012-01-31 20:36:11 +00:00
parent c82f1dcf95
commit 844a24bbb9
61 changed files with 1345 additions and 639 deletions

View File

@@ -32,7 +32,7 @@ class HRLocalFlavorTests(SimpleTestCase):
<option value="ZDŽ">Zadarska županija</option>
<option value="ZGŽ">Zagrebačka županija</option>
</select>'''
self.assertEqual(f.render('county', 'GZG'), out)
self.assertHTMLEqual(f.render('county', 'GZG'), out)
def test_HRPhoneNumberPrefixSelect(self):
f = HRPhoneNumberPrefixSelect()
@@ -64,7 +64,7 @@ class HRLocalFlavorTests(SimpleTestCase):
<option value="98">098</option>
<option value="99">099</option>
</select>'''
self.assertEqual(f.render('phone', '1'), out)
self.assertHTMLEqual(f.render('phone', '1'), out)
def test_HRLicensePlatePrefixSelect(self):
f = HRLicensePlatePrefixSelect()
@@ -104,7 +104,7 @@ class HRLocalFlavorTests(SimpleTestCase):
<option value="ZG">ZG</option>
<option value="ŽU">ŽU</option>
</select>'''
self.assertEqual(f.render('license', 'BJ'), out)
self.assertHTMLEqual(f.render('license', 'BJ'), out)
def test_HRPhoneNumberField(self):
error_invalid = [u'Enter a valid phone number']