mirror of
https://github.com/django/django.git
synced 2025-07-07 11:19:12 +00:00
[soc2009/model-validation] Fixed test for CharField validation
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11195 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
ff0eff055e
commit
f662801023
@ -163,7 +163,7 @@ class ValidationTest(django.test.TestCase):
|
|||||||
self.assertRaises(ValidationError, f.clean, "a", None)
|
self.assertRaises(ValidationError, f.clean, "a", None)
|
||||||
|
|
||||||
def test_charfield_with_choices_cleans_valid_choice(self):
|
def test_charfield_with_choices_cleans_valid_choice(self):
|
||||||
f = models.CharField(choices=[('a','A'), ('b','B')])
|
f = models.CharField(max_length=1, choices=[('a','A'), ('b','B')])
|
||||||
self.assertEqual('a', f.clean('a', None))
|
self.assertEqual('a', f.clean('a', None))
|
||||||
|
|
||||||
def test_charfield_with_choices_raises_error_on_invalid_choice(self):
|
def test_charfield_with_choices_raises_error_on_invalid_choice(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user