diff options
| author | Brian Rosner <brosner@gmail.com> | 2008-06-30 15:38:16 +0000 |
|---|---|---|
| committer | Brian Rosner <brosner@gmail.com> | 2008-06-30 15:38:16 +0000 |
| commit | 829fd5a9670a581309797f56bfc7e5140550e873 (patch) | |
| tree | 6efe30b93fd5fc6564392f1dbaaf04c95a4b6bc2 /tests/regressiontests/forms/fields.py | |
| parent | c349ba4cfc2d137da393bddbda6e78fdb98c9c81 (diff) | |
newforms-admin: Merged from trunk up to [7808]. Fixed #7519, #7573
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/forms/fields.py')
| -rw-r--r-- | tests/regressiontests/forms/fields.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/regressiontests/forms/fields.py b/tests/regressiontests/forms/fields.py index f3b6a96a1e..c9f3efdbda 100644 --- a/tests/regressiontests/forms/fields.py +++ b/tests/regressiontests/forms/fields.py @@ -887,7 +887,7 @@ u'http://www.google.com' Traceback (most recent call last): ... ValidationError: [u'Enter a valid URL.'] ->>> f.clean('http://www.jfoiwjfoi23jfoijoaijfoiwjofiwjefewl.com') # bad domain +>>> f.clean('http://www.broken.djangoproject.com') # bad domain Traceback (most recent call last): ... ValidationError: [u'This URL appears to be a broken link.'] @@ -937,18 +937,24 @@ ValidationError: [u'This field is required.'] >>> f.clean(True) True >>> f.clean(False) -False +Traceback (most recent call last): +... +ValidationError: [u'This field is required.'] >>> f.clean(1) True >>> f.clean(0) -False +Traceback (most recent call last): +... +ValidationError: [u'This field is required.'] >>> f.clean('Django rocks') True >>> f.clean('True') True >>> f.clean('False') -False +Traceback (most recent call last): +... +ValidationError: [u'This field is required.'] >>> f = BooleanField(required=False) >>> f.clean('') |
