Skip to content

Commit

Permalink
Add a scenario test for the new App constructor parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbouchard committed Aug 28, 2021
1 parent 56c6246 commit 14d56bc
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/scenario_tests/test_app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from concurrent.futures import Executor

import pytest
from slack_sdk import WebClient
from slack_sdk.oauth.installation_store import FileInstallationStore
Expand Down Expand Up @@ -56,6 +58,22 @@ def test_listener_registration_error(self):
with pytest.raises(BoltError):
app.action({"type": "invalid_type", "action_id": "a"})(self.simple_listener)

def test_listener_executor(self):
class TestExecutor(Executor):
"""A stupid executor that does nothing."""

pass

executor = TestExecutor()
app = App(
signing_secret="valid",
client=self.web_client,
listener_executor=executor,
)

assert app.listener_runner.listener_executor == executor
assert app.listener_runner.lazy_listener_runner.executor == executor

# --------------------------
# single team auth
# --------------------------
Expand Down

0 comments on commit 14d56bc

Please sign in to comment.