| 14 | assert msg_1 == msg_2 |
| 15 | |
| 16 | def test_attachments(self): |
| 17 | msg = message() |
| 18 | assert repr(msg.attachments) == "Number of Attachments: 0" |
| 19 | msg.attachments.add([(io.BytesIO(b"content"), "filename.txt")]) |
| 20 | assert len(msg.attachments) == 1 |
| 21 | assert repr(msg.attachments) == "Number of Attachments: 1" |
| 22 | assert "filename.txt" in msg.attachments |
| 23 | msg.attachments.clear() |
| 24 | assert len(msg.attachments) == 0 |
| 25 | |
| 26 | msg.attachments.add([(io.BytesIO(b"content"), "filename.txt")]) |
| 27 | assert [at.name for at in msg.attachments] == ["filename.txt"] |
| 28 | assert msg.attachments[0].name == "filename.txt" |
| 29 | msg.attachments.remove(["filename.txt"]) |
| 30 | |
| 31 | def test_properties(self): |
| 32 | msg = message( |