Skip to content

test: port test_video_mongo.py coverage (rendering, student_view, CDN, bumper) #265

Description

@irfanuddinahmad

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions