A bcc address should be in the recipients, but not in the (visible) message headers.
(self)
| 384 | self.assertEqual(message.get_all("Cc"), ["foo@example.com"]) |
| 385 | |
| 386 | def test_bcc_not_in_headers(self): |
| 387 | """ |
| 388 | A bcc address should be in the recipients, |
| 389 | but not in the (visible) message headers. |
| 390 | """ |
| 391 | email = EmailMessage( |
| 392 | to=["to@example.com"], |
| 393 | bcc=["bcc@example.com"], |
| 394 | ) |
| 395 | message = email.message() |
| 396 | self.assertNotIn("Bcc", message) |
| 397 | self.assertNotIn("bcc@example.com", message.as_string()) |
| 398 | self.assertEqual(email.recipients(), ["to@example.com", "bcc@example.com"]) |
| 399 | |
| 400 | def test_reply_to(self): |
| 401 | with self.subTest("Single Reply-To"): |
nothing calls this directly
no test coverage detected