MCPcopy
hub / github.com/django/django / test_recipients_as_tuple

Method test_recipients_as_tuple

tests/mail/tests.py:425–445  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

423 )
424
425 def test_recipients_as_tuple(self):
426 email = EmailMessage(
427 "Subject",
428 "Content",
429 "from@example.com",
430 ("to@example.com", "other@example.com"),
431 cc=("cc@example.com", "cc.other@example.com"),
432 bcc=("bcc@example.com",),
433 )
434 message = email.message()
435 self.assertEqual(message["Cc"], "cc@example.com, cc.other@example.com")
436 self.assertEqual(
437 email.recipients(),
438 [
439 "to@example.com",
440 "other@example.com",
441 "cc@example.com",
442 "cc.other@example.com",
443 "bcc@example.com",
444 ],
445 )
446
447 def test_recipients_as_string(self):
448 for field in ["to", "cc", "bcc", "reply_to"]:

Callers

nothing calls this directly

Calls 3

messageMethod · 0.95
recipientsMethod · 0.95
EmailMessageClass · 0.90

Tested by

no test coverage detected