From b42d1c69940264be317e0ccd520f259959108b36 Mon Sep 17 00:00:00 2001 From: farhan Date: Fri, 23 Jan 2026 18:59:20 +0500 Subject: [PATCH 1/5] chore: remove obsoleted test case --- xblocks_contrib/video/tests/test_video.py | 26 ----------------------- 1 file changed, 26 deletions(-) delete mode 100644 xblocks_contrib/video/tests/test_video.py diff --git a/xblocks_contrib/video/tests/test_video.py b/xblocks_contrib/video/tests/test_video.py deleted file mode 100644 index 784b92f2..00000000 --- a/xblocks_contrib/video/tests/test_video.py +++ /dev/null @@ -1,26 +0,0 @@ -""" -Tests for VideoBlock -""" - -from django.test import TestCase -from xblock.fields import ScopeIds -from xblock.test.toy_runtime import ToyRuntime - -from xblocks_contrib import VideoBlock - - -class TestVideoBlock(TestCase): - """Tests for VideoBlock""" - - def test_my_student_view(self): - """Test the basic view loads.""" - scope_ids = ScopeIds("1", "2", "3", "4") - block = VideoBlock(ToyRuntime(), scope_ids=scope_ids) - frag = block.student_view() - as_dict = frag.to_dict() - content = as_dict["content"] - self.assertIn( - "VideoBlock: count is now", - content, - "XBlock did not render correct student view", - ) From 38be3fce38a6e37f89c5b4d4f2c9d08706713220 Mon Sep 17 00:00:00 2001 From: farhan Date: Fri, 23 Jan 2026 19:15:13 +0500 Subject: [PATCH 2/5] fix: tox docs fixes --- docs/conf.py | 1 + xblocks_contrib/video/tests/__init__.py | 3 +++ xblocks_contrib/video/video.py | 23 ++++++++++++++--------- xblocks_contrib/video/video_handlers.py | 24 +++++++++++++++--------- xblocks_contrib/video/video_utils.py | 8 ++++---- 5 files changed, 37 insertions(+), 22 deletions(-) create mode 100644 xblocks_contrib/video/tests/__init__.py diff --git a/docs/conf.py b/docs/conf.py index 17c0f81c..1a5a43e9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -80,6 +80,7 @@ def get_version(*file_paths): # A list of warning types to suppress arbitrary warning messages. suppress_warnings = [ "image.nonlocal_uri", + "intersphinx.external", # Ignore network failures when fetching intersphinx inventories ] # Add any paths that contain templates here, relative to this directory. diff --git a/xblocks_contrib/video/tests/__init__.py b/xblocks_contrib/video/tests/__init__.py new file mode 100644 index 00000000..6fa36e42 --- /dev/null +++ b/xblocks_contrib/video/tests/__init__.py @@ -0,0 +1,3 @@ +""" +Tests for the video xblock. +""" diff --git a/xblocks_contrib/video/video.py b/xblocks_contrib/video/video.py index d1a21813..b7f475d8 100644 --- a/xblocks_contrib/video/video.py +++ b/xblocks_contrib/video/video.py @@ -1,12 +1,16 @@ -"""Video is ungraded Xmodule for support video content. +""" +Video is ungraded Xmodule for support video content. It's new improved video block, which support additional feature: -- Can play non-YouTube video sources via in-browser HTML5 video player. -- YouTube defaults to HTML5 mode from the start. -- Speed changes in both YouTube and non-YouTube videos happen via -in-browser HTML5 video method (when in HTML5 mode). -- Navigational subtitles can be disabled altogether via an attribute -in XML. -Examples of html5 videos for manual testing: + +* Can play non-YouTube video sources via in-browser HTML5 video player. +* YouTube defaults to HTML5 mode from the start. +* Speed changes in both YouTube and non-YouTube videos happen via + in-browser HTML5 video method (when in HTML5 mode). +* Navigational subtitles can be disabled altogether via an attribute + in XML. + +Examples of html5 videos for manual testing:: + https://s3.amazonaws.com/edx-course-videos/edx-intro/edX-FA12-cware-1_100.mp4 https://s3.amazonaws.com/edx-course-videos/edx-intro/edX-FA12-cware-1_100.webm https://s3.amazonaws.com/edx-course-videos/edx-intro/edX-FA12-cware-1_100.ogv @@ -108,7 +112,8 @@ class VideoBlock( AjaxHandlerMixin, StudioMetadataMixin, LicenseMixin): """ - XML source example: + XML source example:: +