-
Notifications
You must be signed in to change notification settings - Fork 833
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add deprecation warnings to Steps from Apps methods (#1504)
* Added deprecation warnings for workflow step deprecation * Update format
- Loading branch information
1 parent
7d13c3b
commit 5f941f4
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
tests/slack_sdk/web/test_web_client_workflow_step_deprecation.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import unittest | ||
import pytest | ||
|
||
from slack_sdk.web import WebClient | ||
from tests.helpers import remove_os_env_temporarily, restore_os_env | ||
from tests.slack_sdk.web.mock_web_api_server import ( | ||
setup_mock_web_api_server, | ||
cleanup_mock_web_api_server, | ||
) | ||
|
||
|
||
class TestWebClient(unittest.TestCase): | ||
def setUp(self): | ||
setup_mock_web_api_server(self) | ||
self.env_values = remove_os_env_temporarily() | ||
|
||
def tearDown(self): | ||
cleanup_mock_web_api_server(self) | ||
restore_os_env(self.env_values) | ||
|
||
# You can enable this test to verify if the warning can be printed as expected | ||
@pytest.mark.skip() | ||
def test_workflow_step_completed_deprecation(self): | ||
client = WebClient(base_url="http://localhost:8888") | ||
client.workflows_stepCompleted(token="xoxb-api_test", workflow_step_execute_id="W1234") | ||
|
||
@pytest.mark.skip() | ||
def test_workflow_step_failed_deprecation(self): | ||
client = WebClient(base_url="http://localhost:8888") | ||
client.workflows_stepFailed(token="xoxb-api_test", workflow_step_execute_id="W1234", error={}) | ||
|
||
@pytest.mark.skip() | ||
def test_workflow_update_step_deprecation(self): | ||
client = WebClient(base_url="http://localhost:8888") | ||
client.workflows_updateStep(token="xoxb-api_test", workflow_step_edit_id="W1234", inputs={}, outputs={}) |