diff options
author | Claude Paroz <claude@2xlibre.net> | 2016-05-03 18:22:46 +0200 |
---|---|---|
committer | Claude Paroz <claude@2xlibre.net> | 2016-05-10 18:17:43 +0200 |
commit | c3e108694966f045adcc0ba11133a2b3bf238770 (patch) | |
tree | 94d3dfa8c80dc34592ee7c16df470eeb1fc2f034 /tests/logging_tests | |
parent | 31e0314979f6aa1c66828b55dd222c32aad94e9e (diff) | |
download | django-c3e108694966f045adcc0ba11133a2b3bf238770.tar.gz |
Stopped truncating AdminEmailHandler message subjects
Refs #26572, #17281. The RFC doesn't limit total length, just the line length
which is already taken care of by Python itself.
Thanks Tim Graham for the review.
Diffstat (limited to 'tests/logging_tests')
-rw-r--r-- | tests/logging_tests/tests.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/tests/logging_tests/tests.py b/tests/logging_tests/tests.py index b9845ea719..058abfb4a3 100644 --- a/tests/logging_tests/tests.py +++ b/tests/logging_tests/tests.py @@ -300,28 +300,6 @@ class AdminEmailHandlerTest(SimpleTestCase): self.assertEqual(mail.outbox[0].subject, expected_subject) @override_settings( - ADMINS=(('admin', 'admin@example.com'),), - EMAIL_SUBJECT_PREFIX='', - DEBUG=False, - ) - def test_truncate_subject(self): - """ - RFC 2822's hard limit is 998 characters per line. - So, minus "Subject: ", the actual subject must be no longer than 989 - characters. - Refs #17281. - """ - message = 'a' * 1000 - expected_subject = 'ERROR: aa' + 'a' * 980 - - self.assertEqual(len(mail.outbox), 0) - - self.logger.error(message) - - self.assertEqual(len(mail.outbox), 1) - self.assertEqual(mail.outbox[0].subject, expected_subject) - - @override_settings( ADMINS=[('admin', 'admin@example.com')], DEBUG=False, ) |