1
0
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:
Honza Král 2009-07-05 13:30:40 +00:00
parent ff0eff055e
commit f662801023

View File

@ -163,7 +163,7 @@ class ValidationTest(django.test.TestCase):
self.assertRaises(ValidationError, f.clean, "a", None)
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))
def test_charfield_with_choices_raises_error_on_invalid_choice(self):