55
66from slack_sdk .models .attachments import Attachment
77from slack_sdk .models .blocks import Block
8- from slack_sdk .web .internal_utils import (
9- _build_unexpected_body_error_message ,
10- _parse_web_class_objects
11- )
8+ from slack_sdk .web .internal_utils import _build_unexpected_body_error_message , _parse_web_class_objects
129
1310
1411class TestInternalUtils (unittest .TestCase ):
@@ -27,10 +24,16 @@ def test_build_unexpected_body_error_message(self):
2724 )
2825
2926
30- @pytest .mark .parametrize ("initial_blocks" , [
31- [Block (block_id = "42" ), Block (block_id = "24" )], # list
32- (Block (block_id = "42" ), Block (block_id = "24" ),), # tuple
33- ])
27+ @pytest .mark .parametrize (
28+ "initial_blocks" ,
29+ [
30+ [Block (block_id = "42" ), Block (block_id = "24" )], # list
31+ (
32+ Block (block_id = "42" ),
33+ Block (block_id = "24" ),
34+ ), # tuple
35+ ],
36+ )
3437def test_can_parse_sequence_of_blocks (initial_blocks : Sequence [Union [Dict , Block ]]):
3538 kwargs = {"blocks" : initial_blocks }
3639
@@ -42,10 +45,16 @@ def test_can_parse_sequence_of_blocks(initial_blocks: Sequence[Union[Dict, Block
4245 assert isinstance (block , Dict )
4346
4447
45- @pytest .mark .parametrize ("initial_attachments" , [
46- [Attachment (text = "foo" ), Attachment (text = "bar" )], # list
47- (Attachment (text = "foo" ), Attachment (text = "bar" ),), # tuple
48- ])
48+ @pytest .mark .parametrize (
49+ "initial_attachments" ,
50+ [
51+ [Attachment (text = "foo" ), Attachment (text = "bar" )], # list
52+ (
53+ Attachment (text = "foo" ),
54+ Attachment (text = "bar" ),
55+ ), # tuple
56+ ],
57+ )
4958def test_can_parse_sequence_of_attachments (initial_attachments : Sequence [Union [Dict , Attachment ]]):
5059 kwargs = {"attachments" : initial_attachments }
5160
0 commit comments