~ubuntu-branches/ubuntu/quantal/python-django/quantal

« back to all changes in this revision

Viewing changes to tests/modeltests/validation/tests.py

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-10-12 11:34:35 UTC
  • mfrom: (1.1.12 upstream) (29.1.1 maverick-security)
  • Revision ID: james.westby@ubuntu.com-20101012113435-yy57c8tx6g9anf3e
Tags: 1.2.3-1ubuntu0.1
* SECURITY UPDATE: XSS in CSRF protections. New upstream release
  - CVE-2010-3082
* debian/patches/01_disable_url_verify_regression_tests.diff:
  - updated to disable another test that fails without internet connection
  - patch based on work by Kai Kasurinen and Krzysztof Klimonda
* debian/control: don't Build-Depends on locales-all, which doesn't exist
  in maverick

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
        mtv = ModelToValidate(number=10, name='Some Name', url='http://google.com/we-love-microsoft.html')
57
57
        self.assertFieldFailsValidationWithMessage(mtv.full_clean, 'url', [u'This URL appears to be a broken link.'])
58
58
 
59
 
    def test_correct_url_value_passes(self):
60
 
        mtv = ModelToValidate(number=10, name='Some Name', url='http://www.djangoproject.com/')
61
 
        self.assertEqual(None, mtv.full_clean()) # This will fail if there's no Internet connection
62
 
 
63
59
    def test_text_greater_that_charfields_max_length_eaises_erros(self):
64
60
        mtv = ModelToValidate(number=10, name='Some Name'*100)
65
61
        self.assertFailsValidation(mtv.full_clean, ['name',])