From f662801023605ff6fe44416271e39839894e7962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Sun, 5 Jul 2009 13:30:40 +0000 Subject: [PATCH] [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 --- tests/regressiontests/model_fields/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/regressiontests/model_fields/tests.py b/tests/regressiontests/model_fields/tests.py index 6d210b1ffb..d47344d644 100644 --- a/tests/regressiontests/model_fields/tests.py +++ b/tests/regressiontests/model_fields/tests.py @@ -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):