diff --git a/block-kit/tests/blocks/test_plan.py b/block-kit/tests/blocks/test_plan.py index e806350..814e590 100644 --- a/block-kit/tests/blocks/test_plan.py +++ b/block-kit/tests/blocks/test_plan.py @@ -25,9 +25,9 @@ def test_example01(): { "type": "text", "text": "Searched database...", - } + }, ], - } + }, ], }, "output": { @@ -40,9 +40,9 @@ def test_example01(): { "type": "text", "text": "Profile data loaded", - } + }, ], - } + }, ], }, }, @@ -67,9 +67,9 @@ def test_example01(): { "type": "text", "text": "15 data points compiled", - } + }, ], - } + }, ], }, }, diff --git a/block-kit/tests/blocks/test_rich_text.py b/block-kit/tests/blocks/test_rich_text.py index fb6ef56..7c4eb20 100644 --- a/block-kit/tests/blocks/test_rich_text.py +++ b/block-kit/tests/blocks/test_rich_text.py @@ -16,9 +16,9 @@ def test_example01(): { "type": "text", "text": "Hello there, I am a basic rich text block!", - } + }, ], - } + }, ], }, { @@ -39,7 +39,7 @@ def test_example01(): }, }, ], - } + }, ], }, { @@ -60,7 +60,7 @@ def test_example01(): }, }, ], - } + }, ], }, { @@ -81,7 +81,7 @@ def test_example01(): }, }, ], - } + }, ], }, ] @@ -101,7 +101,7 @@ def test_example02(): { "type": "text", "text": "My favorite Slack features (in no particular order):", - } + }, ], }, { @@ -221,7 +221,7 @@ def test_example03(): "text": "Pancakes, extra syrup", }, ], - } + }, ], }, ], @@ -241,10 +241,10 @@ def test_example04(): { "type": "text", "text": '{\n "object": {\n "description": "this is an example of a json object"\n }\n}', - } + }, ], "border": 0, - } + }, ], } assert json.dumps(actual, sort_keys=True) == json.dumps(expected, sort_keys=True) @@ -263,7 +263,7 @@ def test_example05(): { "type": "text", "text": "What we need is good examples in our documentation.", - } + }, ], }, { @@ -288,8 +288,13 @@ def test_example06(): "elements": [ { "type": "rich_text_section", - "elements": [{"type": "broadcast", "range": "everyone"}], - } + "elements": [ + { + "type": "broadcast", + "range": "everyone", + }, + ], + }, ], } assert json.dumps(actual, sort_keys=True) == json.dumps(expected, sort_keys=True) @@ -303,8 +308,13 @@ def test_example07(): "elements": [ { "type": "rich_text_section", - "elements": [{"type": "color", "value": "#F405B3"}], - } + "elements": [ + { + "type": "color", + "value": "#F405B3", + }, + ], + }, ], } assert json.dumps(actual, sort_keys=True) == json.dumps(expected, sort_keys=True) @@ -318,8 +328,13 @@ def test_example08(): "elements": [ { "type": "rich_text_section", - "elements": [{"type": "channel", "channel_id": "C123ABC456"}], - } + "elements": [ + { + "type": "channel", + "channel_id": "C123ABC456", + }, + ], + }, ], } assert json.dumps(actual, sort_keys=True) == json.dumps(expected, sort_keys=True) @@ -339,9 +354,9 @@ def test_example09(): "timestamp": 1720710212, "format": "{date_num} at {time}", "fallback": "timey", - } + }, ], - } + }, ], } assert json.dumps(actual, sort_keys=True) == json.dumps(expected, sort_keys=True) @@ -377,7 +392,7 @@ def test_example10(): "name": "checkered_flag", }, ], - } + }, ], } assert json.dumps(actual, sort_keys=True) == json.dumps(expected, sort_keys=True) @@ -391,8 +406,13 @@ def test_example11(): "elements": [ { "type": "rich_text_section", - "elements": [{"type": "link", "url": "https://api.slack.com"}], - } + "elements": [ + { + "type": "link", + "url": "https://api.slack.com", + }, + ], + }, ], } assert json.dumps(actual, sort_keys=True) == json.dumps(expected, sort_keys=True) @@ -406,8 +426,13 @@ def test_example12(): "elements": [ { "type": "rich_text_section", - "elements": [{"type": "user", "user_id": "U123ABC456"}], - } + "elements": [ + { + "type": "user", + "user_id": "U123ABC456", + }, + ], + }, ], } assert json.dumps(actual, sort_keys=True) == json.dumps(expected, sort_keys=True) @@ -421,8 +446,13 @@ def test_example13(): "elements": [ { "type": "rich_text_section", - "elements": [{"type": "usergroup", "usergroup_id": "G123ABC456"}], - } + "elements": [ + { + "type": "usergroup", + "usergroup_id": "G123ABC456", + }, + ], + }, ], } assert json.dumps(actual, sort_keys=True) == json.dumps(expected, sort_keys=True) diff --git a/block-kit/tests/blocks/test_table.py b/block-kit/tests/blocks/test_table.py index f8eb942..d527739 100644 --- a/block-kit/tests/blocks/test_table.py +++ b/block-kit/tests/blocks/test_table.py @@ -9,16 +9,29 @@ def test_example01(): expected = { "type": "table", "column_settings": [ - {"is_wrapped": True}, - {"align": "right"}, + { + "is_wrapped": True, + }, + { + "align": "right", + }, ], "rows": [ [ - {"type": "raw_text", "text": "Header A"}, - {"type": "raw_text", "text": "Header B"}, + { + "type": "raw_text", + "text": "Header A", + }, + { + "type": "raw_text", + "text": "Header B", + }, ], [ - {"type": "raw_text", "text": "Data 1A"}, + { + "type": "raw_text", + "text": "Data 1A", + }, { "type": "rich_text", "elements": [ @@ -29,14 +42,17 @@ def test_example01(): "type": "link", "text": "Data 1B", "url": "https://slack.com", - } + }, ], - } + }, ], }, ], [ - {"type": "raw_text", "text": "Data 2A"}, + { + "type": "raw_text", + "text": "Data 2A", + }, { "type": "rich_text", "elements": [ @@ -47,9 +63,9 @@ def test_example01(): "type": "link", "text": "Data 2B", "url": "https://slack.com", - } + }, ], - } + }, ], }, ], diff --git a/block-kit/tests/blocks/test_task_card.py b/block-kit/tests/blocks/test_task_card.py index 802b924..b0a79bd 100644 --- a/block-kit/tests/blocks/test_task_card.py +++ b/block-kit/tests/blocks/test_task_card.py @@ -20,9 +20,9 @@ def test_example01(): { "type": "text", "text": "Found weather data for Chicago from 2 sources", - } + }, ], - } + }, ], }, "sources": [