Ticket #19099: 19099-failing-test-case.diff

File 19099-failing-test-case.diff, 1.1 KB (added by Aymeric Augustin, 12 years ago)
  • tests/regressiontests/i18n/patterns/tests.py

    diff --git a/tests/regressiontests/i18n/patterns/tests.py b/tests/regressiontests/i18n/patterns/tests.py
    index 73c9f56..65914e8 100644
    a b from __future__ import unicode_literals  
    33import os
    44
    55from django.core.exceptions import ImproperlyConfigured
     6from django.core import mail
    67from django.core.urlresolvers import reverse, clear_url_caches
    78from django.test import TestCase
    89from django.test.utils import override_settings
    class URLRedirectTests(URLTestCaseBase):  
    169170        response = self.client.get(response['location'])
    170171        self.assertEqual(response.status_code, 200)
    171172
     173    @override_settings(SEND_BROKEN_LINK_EMAILS=True)
     174    def test_no_broken_link_email_on_redirect(self):
     175        response = self.client.get('/account/register/', HTTP_ACCEPT_LANGUAGE='en',
     176            HTTP_REFERER='/another/url/')
     177        self.assertRedirects(response, '/en/account/register/')
     178        self.assertEqual(len(mail.outbox), 0)
     179
    172180
    173181class URLRedirectWithoutTrailingSlashTests(URLTestCaseBase):
    174182    """
Back to Top