Document about the ways to write unit tests for Bolt apps
メンテナーはふだん 1 日以内に返信
@Mohith26 がすでに取り組んでいます。
2026年11月4日 から。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- python
調査の方向性
https://slack.dev/bolt-python/ の Bolt for Python ドキュメントから始め、main.py と api.py に示されているハンドラー構造を確認します。これには app.command、app.event、app.db、ack、respond が含まれます。これらのハンドラーの単体テストについて、ハンドラーの引数と app の依存関係に対するテストダブルを含む、妥当なアプローチを、期待される動作が明確になる例とともに文書化します。
索引モデルが issue の本文から書いたものです。
説明
I am looking to write unit tests for my Bolt API, which consists of an app with several handlers for events / messages. The handlers are both decorated using the app.event decorator, and make use of the app object to access things like the db connection that has been put on it. For example:
# in main.py
app = App(
token=APP_TOKEN,
signing_secret=SIGNING_SECRET,
process_before_response=True,
token_verification_enabled=token_verification_enabled,
)
app.db = db
# in api.py:
from .main import app
@app.command("/slashcommand")
def slash_command(ack, respond):
ack()
results = app.db.do_query()
respond(...)
The thing is, I cannot find any framework pointers, or documentation, on how I would write reasonable unit tests for this. Presumably ones where the kwargs like ack and respond are replaced by test doubles. How do I do this?
The page URLs
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
- 主要言語
- Python
- スター
- 1.3k
- フォーク
- 300
- 平均マージ
- 19時間 33分
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
slackapi/bolt-python のほかの issue
-
`extract_team_id` crashes with `TypeError when payload["user"]` is a string (e.g. `member_joined_channel` events)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンauto-triage-skip bug security semver:major
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
slackapi/bolt-python#1447 · コメント 9 件 ·
メンテナーはふだん 1 日以内に返信
-
auto-triage-stale
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
slackapi/bolt-python#1599 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Error handlers that take args: Args crash with a missing 'next' argument対応中かも @sahiljagtap08 が 42 日前に担当しました。 オープンauto-triage-stale
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
slackapi/bolt-python#1598 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Assistant listener middleware crashes when given a plain function対応中かも @sahiljagtap08 が 42 日前に担当しました。 オープンauto-triage-stale
難易度 2/5 1〜3時間 初心者へのやさしさ 30/100
slackapi/bolt-python#1597 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
AsyncOAuthFlow raises UnboundLocalError on org-wide install without a bot token対応中かも @sahiljagtap08 が 42 日前に担当しました。 オープンauto-triage-stale
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
slackapi/bolt-python#1596 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
slackapi/bolt-python の issue をすべて見る
似ている issue
-
[Bug]: reme CLI crashes when the running server used a relative config path対応中かも @nurlanmnn が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
agentscope-ai/ReMe#770 ·
メンテナーはふだん 1 日以内に返信
-
Pi: paused model calls are reported as "not signed in" when the model's provider comes from an extension対応中かも @balcsida が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
microsoft/TokenEconomizer#288 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 67/100
sickn33/agentic-awesome-skills#2437 ·
メンテナーはふだん 1 日以内に返信
-
site-bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ethereum/consensus-specs#5846 ·
メンテナーはふだん 1 日以内に返信