Пример #1
0
def test_plain_text_object(plain_text_object: PlainTextObject):
    assert plain_text_object.render() == {
        "type": TextObject.BTYPE_PLAINTEXT,
        "text": plain_text_object.text,
        "emoji": plain_text_object.emoji
    }
Пример #2
0
def test_get_blocks():
    text1 = PlainTextObject(text="Text 1")
    text2 = PlainTextObject(text="Text 2")
    text3 = PlainTextObject(text="Text 3")
    blocks = get_blocks(text1, text2, text3)
    assert blocks == [text1.render(), text2.render(), text3.render()]