openedx / openedx/xblocks-core
test: port test_video_mongo.py coverage (rendering, student_view, CDN, bumper)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 15
- Avg merge
- 5d 16m
- Merged PRs (30d)
- 7
Description
Context
As part of the Slash-n-Burn Built-In XBlocks epic (openedx-platform#37819), the file `lms/djangoapps/courseware/tests/test_video_mongo.py` was deleted from openedx-platform in PR #38750.
This test file covered the VideoBlock rendering layer now residing in xblocks-contrib. The coverage was not ported before deletion.
What needs to be ported
`test_video_mongo.py` covered:
- `get_html` / `student_view` — full render pipeline, context variables, template rendering
- CDN URL rewriting — `rewrite_video_url` logic for video source URLs
- Bumper video — pre-roll video injection, bumper dismissed state
- `editor_saved` — YouTube metadata fetch, sub-import on save
- Public video sharing — `public_access` field rendering
- Transcript availability — `get_transcripts_info`, language selection in context
- Speed/download settings — context variables for player configuration
The xblocks-contrib VideoBlock has no equivalent rendering-layer tests.
Acceptance Criteria
- Port equivalent tests into `xblocks_contrib/tests/`
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing lms/djangoapps/courseware/tests/test_video_mongo.py and the xblocks-contrib VideoBlock implementation, using the linked deletion PR for the prior coverage. Port the listed rendering, CDN, bumper, editor_saved, sharing, transcript, and player-setting tests into xblocks_contrib/tests/. Done means equivalent tests pass without xmodule imports and CI stays green.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100