File: 07_disable_url_verify_model_tests.diff

package info (click to toggle)
python-django 1.2.3-3%2Bsqueeze15
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 29,720 kB
  • ctags: 21,538
  • sloc: python: 101,631; xml: 574; makefile: 149; sh: 121; sql: 7
file content (26 lines) | stat: -rw-r--r-- 1,443 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Forwarded-Upstream: not needed
Author: Evgeni Golov <evgeni@debian.org>
Comment:
 Disable model tests that require an internet connection.
 .
 This is a Debian specific patch.

Index: python-django-1.2.3/tests/modeltests/validation/tests.py
===================================================================
--- python-django-1.2.3.orig/tests/modeltests/validation/tests.py	2010-10-23 14:59:12.447389830 +0200
+++ python-django-1.2.3/tests/modeltests/validation/tests.py	2010-10-23 15:01:01.875390381 +0200
@@ -52,14 +52,6 @@
         mtv = ModelToValidate(number=10, name='Some Name', url='not a url')
         self.assertFieldFailsValidationWithMessage(mtv.full_clean, 'url', [u'Enter a valid value.'])
 
-    def test_correct_url_but_nonexisting_gives_404(self):
-        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',])