Skip to content

Commit

Permalink
Fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Nov 22, 2023
1 parent 5088f66 commit b44f2d0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ def setUp(self):
if self.channel_id is None:
millis = int(round(time.time() * 1000))
channel_name = f"private-test-channel-{millis}"
self.channel_id = client.conversations_create(
name=channel_name,
is_private=True,
)[
self.channel_id = client.conversations_create(name=channel_name, is_private=True,)[
"channel"
]["id"]

Expand Down
7 changes: 1 addition & 6 deletions integration_tests/web/test_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,7 @@ def tearDown(self):

def test_sync(self):
client = self.sync_client
user_id = list(
filter(
lambda u: not u["deleted"] and "bot_id" not in u,
client.users_list(limit=50)["members"],
)
)[
user_id = list(filter(lambda u: not u["deleted"] and "bot_id" not in u, client.users_list(limit=50)["members"],))[
0
]["id"]

Expand Down
2 changes: 1 addition & 1 deletion slack_sdk/web/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3668,7 +3668,7 @@ async def functions_completeSuccess(
"""Signal the successful completion of a function
https://api.slack.com/methods/functions.completeSuccess
"""
kwargs.update({"function_execution_id": function_execution_id, "outputs": outputs})
kwargs.update({"function_execution_id": function_execution_id, "outputs": json.dumps(outputs)})
return await self.api_call("functions.completeSuccess", params=kwargs)

Check warning on line 3672 in slack_sdk/web/async_client.py

View check run for this annotation

Codecov / codecov/patch

slack_sdk/web/async_client.py#L3671-L3672

Added lines #L3671 - L3672 were not covered by tests

async def functions_completeError(
Expand Down
2 changes: 1 addition & 1 deletion slack_sdk/web/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3659,7 +3659,7 @@ def functions_completeSuccess(
"""Signal the successful completion of a function
https://api.slack.com/methods/functions.completeSuccess
"""
kwargs.update({"function_execution_id": function_execution_id, "outputs": outputs})
kwargs.update({"function_execution_id": function_execution_id, "outputs": json.dumps(outputs)})
return self.api_call("functions.completeSuccess", params=kwargs)

Check warning on line 3663 in slack_sdk/web/client.py

View check run for this annotation

Codecov / codecov/patch

slack_sdk/web/client.py#L3662-L3663

Added lines #L3662 - L3663 were not covered by tests

def functions_completeError(
Expand Down
2 changes: 1 addition & 1 deletion slack_sdk/web/legacy_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3670,7 +3670,7 @@ def functions_completeSuccess(
"""Signal the successful completion of a function
https://api.slack.com/methods/functions.completeSuccess
"""
kwargs.update({"function_execution_id": function_execution_id, "outputs": outputs})
kwargs.update({"function_execution_id": function_execution_id, "outputs": json.dumps(outputs)})
return self.api_call("functions.completeSuccess", params=kwargs)

Check warning on line 3674 in slack_sdk/web/legacy_client.py

View check run for this annotation

Codecov / codecov/patch

slack_sdk/web/legacy_client.py#L3673-L3674

Added lines #L3673 - L3674 were not covered by tests

def functions_completeError(
Expand Down

0 comments on commit b44f2d0

Please sign in to comment.