[Python-modules-commits] r9431 - in packages/python-django/trunk/debian/patches (1 file)

lamby at users.alioth.debian.org lamby at users.alioth.debian.org
Sun Aug 23 17:23:35 UTC 2009


    Date: Sunday, August 23, 2009 @ 17:23:34
  Author: lamby
Revision: 9431

Add missing patch (should have been attached to r9428).

Added:
  packages/python-django/trunk/debian/patches/01_disable_url_verify_regression_tests.diff

Added: packages/python-django/trunk/debian/patches/01_disable_url_verify_regression_tests.diff
===================================================================
--- packages/python-django/trunk/debian/patches/01_disable_url_verify_regression_tests.diff	                        (rev 0)
+++ packages/python-django/trunk/debian/patches/01_disable_url_verify_regression_tests.diff	2009-08-23 17:23:34 UTC (rev 9431)
@@ -0,0 +1,41 @@
+Forwarded-Upstream: not needed
+Author: Krzysztof Klimonda <kklimonda at syntaxhighlighted.com>
+Comment:
+ Disable regression tests that require an internet connection.
+ .
+ This is a Debian specific patch.
+
+Index: python-django-1.1/tests/regressiontests/forms/fields.py
+===================================================================
+--- python-django-1.1.orig/tests/regressiontests/forms/fields.py	2009-08-15 21:03:21.248330080 +0200
++++ python-django-1.1/tests/regressiontests/forms/fields.py	2009-08-15 21:03:45.709392050 +0200
+@@ -977,29 +977,6 @@
+ ...
+ ValidationError: [u'Enter a valid URL.']
+ 
+-URLField takes an optional verify_exists parameter, which is False by default.
+-This verifies that the URL is live on the Internet and doesn't return a 404 or 500:
+->>> f = URLField(verify_exists=True)
+->>> f.clean('http://www.google.com') # This will fail if there's no Internet connection
+-u'http://www.google.com/'
+->>> f.clean('http://example')
+-Traceback (most recent call last):
+-...
+-ValidationError: [u'Enter a valid URL.']
+->>> f.clean('http://www.broken.djangoproject.com') # bad domain
+-Traceback (most recent call last):
+-...
+-ValidationError: [u'This URL appears to be a broken link.']
+->>> f.clean('http://google.com/we-love-microsoft.html') # good domain, bad page
+-Traceback (most recent call last):
+-...
+-ValidationError: [u'This URL appears to be a broken link.']
+->>> f = URLField(verify_exists=True, required=False)
+->>> f.clean('')
+-u''
+->>> f.clean('http://www.google.com') # This will fail if there's no Internet connection
+-u'http://www.google.com/'
+-
+ URLField also access min_length and max_length parameters, for convenience.
+ >>> f = URLField(min_length=15, max_length=20)
+ >>> f.clean('http://f.com')




More information about the Python-modules-commits mailing list