From aba0e541caaa086f183197eaaca0ac20a730bbe4 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 9 Jun 2024 09:09:07 +0100 Subject: Fixed #35537 -- Changed EmailMessage.attachments and EmailMultiAlternatives.alternatives to use namedtuples. This makes it more descriptive to pull out the named fields. --- tests/view_tests/tests/test_debug.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/view_tests') diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py index 45a0dc70ee..9383c0d873 100644 --- a/tests/view_tests/tests/test_debug.py +++ b/tests/view_tests/tests/test_debug.py @@ -1463,7 +1463,7 @@ class ExceptionReportTestMixin: self.assertNotIn("worcestershire", body_plain) # Frames vars are shown in html email reports. - body_html = str(email.alternatives[0][0]) + body_html = str(email.alternatives[0].content) self.assertIn("cooked_eggs", body_html) self.assertIn("scrambled", body_html) self.assertIn("sauce", body_html) @@ -1499,7 +1499,7 @@ class ExceptionReportTestMixin: self.assertNotIn("worcestershire", body_plain) # Frames vars are shown in html email reports. - body_html = str(email.alternatives[0][0]) + body_html = str(email.alternatives[0].content) self.assertIn("cooked_eggs", body_html) self.assertIn("scrambled", body_html) self.assertIn("sauce", body_html) -- cgit v1.3