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 270ed3c
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
Expand Up @@ -56,6 +56,24 @@ 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):
import concurrent.futures

class TestExecutor(concurrent.futures.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 270ed3c

Please sign in to comment.