From 2d01c9de6918bf998d35bfe8473c57914738a9c6 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 31 Mar 2012 18:27:17 +0000 Subject: [PATCH] Removed some more useless code related to the verify_exists removal. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17856 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/validators.py | 3 --- tests/regressiontests/forms/tests/fields.py | 7 +------ 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/django/core/validators.py b/django/core/validators.py index 7d7f473b6d..ce8e6937fe 100644 --- a/django/core/validators.py +++ b/django/core/validators.py @@ -42,9 +42,6 @@ class URLValidator(RegexValidator): r'(?::\d+)?' # optional port r'(?:/?|[/?]\S+)$', re.IGNORECASE) - def __init__(self): - super(URLValidator, self).__init__() - def __call__(self, value): try: super(URLValidator, self).__call__(value) diff --git a/tests/regressiontests/forms/tests/fields.py b/tests/regressiontests/forms/tests/fields.py index 3820bb9858..6e4a5445ca 100644 --- a/tests/regressiontests/forms/tests/fields.py +++ b/tests/regressiontests/forms/tests/fields.py @@ -662,13 +662,8 @@ class FieldsTests(SimpleTestCase): u'http://العربية.idn.icann.org/', ) for url in urls: - # Valid and existent IDN + # Valid IDN self.assertEqual(url, f.clean(url)) - # Valid but non-existent IDN - try: - f.clean(u'http://broken.עברית.idn.icann.org/') - except ValidationError, e: - self.assertEqual("[u'This URL appears to be a broken link.']", str(e)) def test_urlfield_not_string(self): f = URLField(required=False)