MCPcopy
hub / github.com/django/django / test_multiple_recipients

Method test_multiple_recipients

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

Source from the content-addressed store, hash-verified

270 self.assertEqual(message["To"], "to@example.com")
271
272 def test_multiple_recipients(self):
273 email = EmailMessage(
274 "Subject",
275 "Content\n",
276 "from@example.com",
277 ["to@example.com", "other@example.com"],
278 )
279 message = email.message()
280 self.assertEqual(message["Subject"], "Subject")
281 self.assertEqual(message.get_payload(), "Content\n")
282 self.assertEqual(message["From"], "from@example.com")
283 self.assertEqual(message["To"], "to@example.com, other@example.com")
284
285 def test_header_omitted_for_no_to_recipients(self):
286 message = EmailMessage(

Callers

nothing calls this directly

Calls 2

messageMethod · 0.95
EmailMessageClass · 0.90

Tested by

no test coverage detected