(self)
| 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"): |
| 402 | email = EmailMessage( |
| 403 | "Subject", |
| 404 | "Content", |
| 405 | "from@example.com", |
| 406 | ["to@example.com"], |
| 407 | reply_to=["reply_to@example.com"], |
| 408 | ) |
| 409 | message = email.message() |
| 410 | self.assertEqual(message["Reply-To"], "reply_to@example.com") |
| 411 | |
| 412 | with self.subTest("Multiple Reply-To"): |
| 413 | email = EmailMessage( |
| 414 | "Subject", |
| 415 | "Content", |
| 416 | "from@example.com", |
| 417 | ["to@example.com"], |
| 418 | reply_to=["reply_to1@example.com", "reply_to2@example.com"], |
| 419 | ) |
| 420 | message = email.message() |
| 421 | self.assertEqual( |
| 422 | message["Reply-To"], "reply_to1@example.com, reply_to2@example.com" |
| 423 | ) |
| 424 | |
| 425 | def test_recipients_as_tuple(self): |
| 426 | email = EmailMessage( |
nothing calls this directly
no test coverage detected