44from pathlib import Path
55from typing import Dict
66
7-
87from slack_sdk .models .attachments import Attachment
98from slack_sdk .models .blocks import Block , DividerBlock
10- from slack_sdk .models .messages .chunk import MarkdownTextChunk , TaskUpdateChunk
9+ from slack_sdk .models .messages .chunk import MarkdownTextChunk , PlanUpdateChunk , TaskUpdateChunk
1110from slack_sdk .web .internal_utils import (
1211 _build_unexpected_body_error_message ,
1312 _get_url ,
@@ -59,9 +58,14 @@ def test_can_parse_sequence_of_attachments(self):
5958
6059 def test_can_parse_sequence_of_chunks (self ):
6160 for chunks in [
62- [MarkdownTextChunk (text = "fiz" ), TaskUpdateChunk (id = "001" , title = "baz" , status = "complete" )], # list
61+ [
62+ MarkdownTextChunk (text = "fiz" ),
63+ PlanUpdateChunk (title = "fuz" ),
64+ TaskUpdateChunk (id = "001" , title = "baz" , status = "complete" ),
65+ ], # list
6366 (
6467 MarkdownTextChunk (text = "fiz" ),
68+ PlanUpdateChunk (title = "fuz" ),
6569 TaskUpdateChunk (id = "001" , title = "baz" , status = "complete" ),
6670 ), # tuple
6771 ]:
@@ -87,7 +91,11 @@ def test_can_parse_str_attachments(self):
8791
8892 def test_can_parse_str_chunks (self ):
8993 input = json .dumps (
90- [MarkdownTextChunk (text = "fiz" ).to_dict (), TaskUpdateChunk (id = "001" , title = "baz" , status = "complete" ).to_dict ()]
94+ [
95+ MarkdownTextChunk (text = "fiz" ).to_dict (),
96+ PlanUpdateChunk (title = "fuz" ).to_dict (),
97+ TaskUpdateChunk (id = "001" , title = "baz" , status = "complete" ).to_dict (),
98+ ]
9199 )
92100 kwargs = {"chunks" : input }
93101 _parse_web_class_objects (kwargs )
0 commit comments