Add webhook verification tests for edge cases

オープン 初心者向け
#5 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
85/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
testing

調査の方向性

apidly/webhook.pyと既存のwebhookテスト(tests/test_sdk.py)を読み、専用のケースをtests/test_webhook.pyに追加してください。列挙されたすべてのエッジケースを網羅し、クラッシュせずにFalseまたはドキュメントに記載された例外になることを検証してください。python -m pytest -qを実行し、オフラインでテストスイートが通ることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

good first issue help wanted tests

Context

apidly/webhook.py has verify_webhook, verify_standard_webhook and verify_webhook_request. They are used in tests/test_sdk.py, but a dedicated, easy-to-read file for the edge cases would help the next person who touches signing.

Acceptance criteria

  • tests/test_webhook.py with cases for: a timestamp outside the tolerance, a tampered body, a wrong secret, headers in different letter case, several signatures in one header, a missing header, and a body passed as bytes and as str.
  • Each case asserts False (or the documented exception), never a crash.
  • python -m pytest -q passes; no network.

Pointers

  • apidly/webhook.py, tests/test_sdk.py (existing webhook tests), examples/04_webhook_receiver.py

Not sure where to start, or want to claim it? Comment here first, or ask in Discussions. See CONTRIBUTING.md. Tests run offline and never call the real API.

主要言語
Python
スター
1
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apidly-ltd/apidly-python のほかの issue

apidly-ltd/apidly-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。