test: port test_video_handlers.py coverage (handler dispatch, transcripts)

オープン
#264 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python
領域
backend, testing

調査の方向性

video_handlers.py から始め、openedx-platform PR #38750 を通じて削除された lms/djangoapps/courseware/tests/test_video_handlers.py を調べ、元のケースを確認します。handler-dispatch、トランスクリプト、位置追跡、メタデータ保存のカバレッジを xblocks_contrib/tests/ に移植し、その後テストスイートを実行して、xmodule からインポートせずにパスすることを確認します。

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

説明

Context

As part of the Slash-n-Burn Built-In XBlocks epic (openedx-platform#37819), the file `lms/djangoapps/courseware/tests/test_video_handlers.py` was deleted from openedx-platform in PR #38750.

This test file covered `VideoBlock` handler logic that now lives in xblocks-contrib. The coverage was not ported before deletion.

What needs to be ported

`test_video_handlers.py` covered:

  • Handler dispatch — `handle_ajax`, routing to sub-handlers
  • Transcript download/upload/delete — `transcript`, `save_transcript`, `delete_transcript` handlers
  • Transcript language/content negotiation — SRT vs SJSON format selection, language fallback
  • Video position tracking — `save_user_state` handler
  • Metadata save — `metadata_save` handler, field validation

The `video_handlers.py` module in xblocks-contrib is entirely untested at the handler level.

Acceptance Criteria

  • Port equivalent tests into `xblocks_contrib/tests/` (or an appropriate subpackage)
  • Tests should pass against the xblocks-contrib VideoBlock without importing from xmodule
  • CI must remain green

Related

  • openedx-platform PR: #38750
  • Epic: openedx-platform#37819
主要言語
Python
スター
0
フォーク
16
平均マージ
3時間 45分
マージ済み PR(30日)
5

環境構築

はじめの一歩

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

openedx/xblocks-core のほかの issue

openedx/xblocks-core の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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