Ticket #25099: 25099-regress-test.diff

File 25099-regress-test.diff, 585 bytes (added by Tim Graham, 9 years ago)
  • tests/logging_tests/tests.py

    diff --git a/tests/logging_tests/tests.py b/tests/logging_tests/tests.py
    index 0b4abbf..710b73f 100644
    a b class AdminEmailHandlerTest(SimpleTestCase):  
    352352        self.assertEqual(len(mail.outbox), 1)
    353353        self.assertEqual(mail.outbox[0].to, ['manager@example.com'])
    354354
     355    @override_settings(ALLOWED_HOSTS='example.com')
     356    def test_disallowed_host_doesnt_crash(self):
     357        response = self.client.get('/', HTTP_HOST='evil.com')
     358
    355359
    356360class SettingsConfigTest(AdminScriptTestCase):
    357361    """
Back to Top