Package: python-django
Version: 1.2.3-1

I've missed one of tests, that require network connection, and fail on
buildd. Attached is an updated
01_disable_url_verify_regression_tests.diff that fixes this problem.

-- 
Krzysztof Klimonda <kklimo...@syntaxhighlighted.com>
Forwarded-Upstream: not needed
Author: Chris Lamb <la...@debian.org>
Comment:
 Disable regression tests that require an internet connection.
 .
 This is a Debian specific patch.

Index: lp.636482/tests/regressiontests/forms/fields.py
===================================================================
--- lp.636482.orig/tests/regressiontests/forms/fields.py	2010-09-21 20:05:50.661547000 +0200
+++ lp.636482/tests/regressiontests/forms/fields.py	2010-09-21 20:24:10.145632000 +0200
@@ -513,33 +513,6 @@
         self.assertRaisesErrorWithMessage(ValidationError, "[u'Enter a valid URL.']", f.clean, 'http://example.')
         self.assertRaisesErrorWithMessage(ValidationError, "[u'Enter a valid URL.']", f.clean, 'http://.com')
 
-    def test_urlfield_39(self):
-        f = URLField(verify_exists=True)
-        self.assertEqual(u'http://www.google.com/', f.clean('http://www.google.com')) # This will fail if there's no Internet connection
-        self.assertRaisesErrorWithMessage(ValidationError, "[u'Enter a valid URL.']", f.clean, 'http://example')
-        self.assertRaises(ValidationError, f.clean, 'http://www.broken.djangoproject.com') # bad domain
-        try:
-            f.clean('http://www.broken.djangoproject.com') # bad domain
-        except ValidationError, e:
-            self.assertEqual("[u'This URL appears to be a broken link.']", str(e))
-        self.assertRaises(ValidationError, f.clean, 'http://google.com/we-love-microsoft.html') # good domain, bad page
-        try:
-            f.clean('http://google.com/we-love-microsoft.html') # good domain, bad page
-        except ValidationError, e:
-            self.assertEqual("[u'This URL appears to be a broken link.']", str(e))
-        # Valid and existent IDN
-        self.assertEqual(u'http://\u05e2\u05d1\u05e8\u05d9\u05ea.idn.icann.org/', f.clean(u'http://עברית.idn.icann.org/'))
-        # 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_40(self):
-        f = URLField(verify_exists=True, required=False)
-        self.assertEqual(u'', f.clean(''))
-        self.assertEqual(u'http://www.google.com/', f.clean('http://www.google.com')) # This will fail if there's no Internet connection
-
     def test_urlfield_41(self):
         f = URLField(min_length=15, max_length=20)
         self.assertRaisesErrorWithMessage(ValidationError, "[u'Ensure this value has at least 15 characters (it has 13).']", f.clean, 'http://f.com')
Index: lp.636482/tests/modeltests/validation/tests.py
===================================================================
--- lp.636482.orig/tests/modeltests/validation/tests.py	2010-09-21 20:05:50.681547000 +0200
+++ lp.636482/tests/modeltests/validation/tests.py	2010-09-21 20:26:24.101547000 +0200
@@ -56,10 +56,6 @@
         mtv = ModelToValidate(number=10, name='Some Name', url='http://google.com/we-love-microsoft.html')
         self.assertFieldFailsValidationWithMessage(mtv.full_clean, 'url', [u'This URL appears to be a broken link.'])
 
-    def test_correct_url_value_passes(self):
-        mtv = ModelToValidate(number=10, name='Some Name', url='http://www.djangoproject.com/')
-        self.assertEqual(None, mtv.full_clean()) # This will fail if there's no Internet connection
-
     def test_text_greater_that_charfields_max_length_eaises_erros(self):
         mtv = ModelToValidate(number=10, name='Some Name'*100)
         self.assertFailsValidation(mtv.full_clean, ['name',])

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to