1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

[soc2009/model-validation] Added capacity for ComplexValidator handling to models

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11271 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Honza Král
2009-07-19 20:55:58 +00:00
parent 021ad1a024
commit 8d4417c75d
5 changed files with 56 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ from validators import TestModelsWithValidators
class BaseModelValidationTests(ValidationTestCase):
def test_missing_required_field_raises_error(self):
mtv = ModelToValidate()
mtv = ModelToValidate(f_with_custom_validator=42)
self.assertFailsValidation(mtv.clean, ['name', 'number'])
def test_with_correct_value_model_validates(self):