diff options
| author | Honza Král <honza.kral@gmail.com> | 2009-09-11 22:12:30 +0000 |
|---|---|---|
| committer | Honza Král <honza.kral@gmail.com> | 2009-09-11 22:12:30 +0000 |
| commit | 83a3588ff712d5fe44e9692f5cb6a1d020f3ab2f (patch) | |
| tree | 1c24fa60c9b110adb150231cdb69cd731f208af5 /tests | |
| parent | 9222091de8fa2fcb4fedd74ac99b65c88d295135 (diff) | |
[soc2009/model-validation] Fixed #11826 django.forms.fields.URLField rejects valid URLs with no abs_path component
Thanks wam
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11525 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/modeltests/validators/tests.py | 2 | ||||
| -rw-r--r-- | tests/regressiontests/forms/fields.py | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/modeltests/validators/tests.py b/tests/modeltests/validators/tests.py index de4d94f1af..331f6f0b61 100644 --- a/tests/modeltests/validators/tests.py +++ b/tests/modeltests/validators/tests.py @@ -106,6 +106,8 @@ SIMPLE_VALIDATORS_VALUES = ( (URLValidator(), 'http://200.8.9.10/', None), (URLValidator(), 'http://200.8.9.10:8000/test', None), (URLValidator(), 'http://valid-----hyphens.com/', None), + (URLValidator(), 'http://example.com?something=value', None), + (URLValidator(), 'http://example.com/index.php?something=value&another=value2', None), (URLValidator(), 'foo', ValidationError), (URLValidator(), 'http://', ValidationError), diff --git a/tests/regressiontests/forms/fields.py b/tests/regressiontests/forms/fields.py index 9bf6022e3f..2efe72d02c 100644 --- a/tests/regressiontests/forms/fields.py +++ b/tests/regressiontests/forms/fields.py @@ -496,6 +496,10 @@ class TestFields(TestCase): f = URLField() self.assertEqual(u'http://example.com/', f.clean('http://example.com')) self.assertEqual(u'http://example.com/test', f.clean('http://example.com/test')) + + def test_urlfield_ticket11826(self): + f = URLField() + self.assertEqual(u'http://example.com/?some_param=some_value', f.clean('http://example.com?some_param=some_value')) # BooleanField ################################################################ |
