Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#264 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
72/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
backend, testing

Research direction

Start with video_handlers.py and inspect the deleted lms/djangoapps/courseware/tests/test_video_handlers.py through openedx-platform PR #38750 for the original cases. Port handler-dispatch, transcript, position-tracking, and metadata-save coverage into xblocks_contrib/tests/, then run the test suite and confirm it passes without importing from xmodule.

Written by the indexing model from the issue text.

Description

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
Dominant language
Python
Stars
0
Forks
16
Avg merge
5h 37m
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openedx/xblocks-core

All issues in openedx/xblocks-core

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.