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

Method test_send

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

Source from the content-addressed store, hash-verified

294 assert call.payload == {"destinationId": "Test"}
295
296 def test_send(self):
297 msg = message(__cloud_data__={})
298 assert msg.send(save_to_sent_folder=False)
299 [call] = msg.con.calls
300 assert call.url == self.base_url + "me/sendMail"
301 assert call.payload == {
302 "message": {
303 "body": {"content": "", "contentType": "HTML"},
304 "flag": {"flagStatus": "notFlagged"},
305 "importance": "normal",
306 "isDeliveryReceiptRequested": False,
307 "isReadReceiptRequested": False,
308 "subject": "",
309 },
310 "saveToSentItems": False,
311 }
312
313 def test_send_with_headers(self):
314 my_testheader = {"x-my-custom-header": "some_value"}

Callers

nothing calls this directly

Calls 2

messageFunction · 0.85
sendMethod · 0.80

Tested by

no test coverage detected