MCPcopy Index your code
hub / github.com/O365/python-o365 / test_body

Method test_body

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

Source from the content-addressed store, hash-verified

75 msg.is_read_receipt_requested = True
76
77 def test_body(self):
78 msg = message(
79 __cloud_data__={
80 "body": {
81 "contentType": "text",
82 "content": "content",
83 }
84 }
85 )
86 assert msg.body_type == "text"
87 assert msg.get_body_soup() is None
88 assert msg.get_body_text() == "content"
89 msg.body = "more content"
90 assert msg.body == "more content\ncontent"
91 msg.body = ""
92 assert msg.body == ""
93
94 msg = message(
95 __cloud_data__={
96 "body": {
97 "content": "<html><body>content",
98 }
99 }
100 )
101 assert msg.get_body_soup() is not None
102 assert msg.get_body_text() == "content"
103
104 def test_to_api_data(self):
105 msg = message(

Callers

nothing calls this directly

Calls 3

messageFunction · 0.85
get_body_soupMethod · 0.45
get_body_textMethod · 0.45

Tested by

no test coverage detected