diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2007-09-14 02:11:24 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2007-09-14 02:11:24 +0000 |
| commit | a2ce7669d902cf32eeac9307b804b78ed4150fe5 (patch) | |
| tree | 2d82420bd2991f237befa0fefadde0bb869a07f8 /tests/regressiontests | |
| parent | 8b0eaba0ee66e2ec6307ae9e34cf8610614d67a6 (diff) | |
Fixed #3421 -- Added IP and localhost validation to newforms URLField. Thanks, SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6152 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests')
| -rw-r--r-- | tests/regressiontests/forms/tests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/regressiontests/forms/tests.py b/tests/regressiontests/forms/tests.py index 3d71bffbfd..b0a64a7854 100644 --- a/tests/regressiontests/forms/tests.py +++ b/tests/regressiontests/forms/tests.py @@ -1607,10 +1607,18 @@ ValidationError: [u'This field is required.'] Traceback (most recent call last): ... ValidationError: [u'This field is required.'] +>>> f.clean('http://localhost') +u'http://localhost' >>> f.clean('http://example.com') u'http://example.com' >>> f.clean('http://www.example.com') u'http://www.example.com' +>>> f.clean('http://www.example.com:8000/test') +u'http://www.example.com:8000/test' +>>> f.clean('http://200.8.9.10') +u'http://200.8.9.10' +>>> f.clean('http://200.8.9.10:8000/test') +u'http://200.8.9.10:8000/test' >>> f.clean('foo') Traceback (most recent call last): ... |
