MCPcopy Create free account
hub / github.com/O365/python-o365 / test_send_with_headers

Method test_send_with_headers

tests/test_message.py:313–330  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

311 }
312
313 def test_send_with_headers(self):
314 my_testheader = {"x-my-custom-header": "some_value"}
315 msg = message(__cloud_data__={"internetMessageHeaders": [my_testheader]})
316 assert msg.send(save_to_sent_folder=False)
317 [call] = msg.con.calls
318 assert call.url == self.base_url + "me/sendMail"
319 assert call.payload == {
320 "message": {
321 "body": {"content": "", "contentType": "HTML"},
322 "flag": {"flagStatus": "notFlagged"},
323 "importance": "normal",
324 "isDeliveryReceiptRequested": False,
325 "isReadReceiptRequested": False,
326 "subject": "",
327 "internetMessageHeaders": [my_testheader],
328 },
329 "saveToSentItems": False,
330 }
331
332 def test_send_existing_object(self):
333 msg = message(__cloud_data__={"id": "123"})

Callers

nothing calls this directly

Calls 2

messageFunction · 0.85
sendMethod · 0.80

Tested by

no test coverage detected