From 52127f5b101013acd0d3bf4e454f6875c7f9af81 Mon Sep 17 00:00:00 2001 From: farhan Date: Tue, 26 Mar 2024 11:16:38 +0500 Subject: [PATCH] chore: fix test case --- invideoquiz/invideoquiz.py | 9 +++++++-- requirements/base.txt | 6 ++++-- requirements/constraints.txt | 1 + requirements/quality.txt | 3 ++- requirements/tox.txt | 2 +- requirements/travis.txt | 2 +- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/invideoquiz/invideoquiz.py b/invideoquiz/invideoquiz.py index f902bbe..55647de 100644 --- a/invideoquiz/invideoquiz.py +++ b/invideoquiz/invideoquiz.py @@ -3,14 +3,19 @@ videos at specific time points. """ -import os import json +import os + import pkg_resources from xblock.core import XBlock from xblock.fields import Scope from xblock.fields import String -from xblock.fragment import Fragment + +try: + from web_fragments.fragment import Fragment +except ImportError: + from xblock.fragment import Fragment from xblock.validation import ValidationMessage try: from xblock.utils.studio_editable import StudioEditableXBlockMixin diff --git a/requirements/base.txt b/requirements/base.txt index 839f28c..b9e2758 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -8,8 +8,10 @@ appdirs==1.4.4 # via fs asgiref==3.8.1 # via django -backports-zoneinfo==0.2.1 - # via django +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # django django==4.2.11 # via # -c requirements/common_constraints.txt diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 7cdb2df..24d00dc 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -12,3 +12,4 @@ # This file contains all common constraints for edx-repos -c common_constraints.txt +backports.zoneinfo;python_version<"3.9" diff --git a/requirements/quality.txt b/requirements/quality.txt index 61837dd..c1c6911 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -14,8 +14,9 @@ asgiref==3.8.1 # django astroid==3.1.0 # via pylint -backports-zoneinfo==0.2.1 +backports-zoneinfo==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/base.txt # django coverage==7.4.4 diff --git a/requirements/tox.txt b/requirements/tox.txt index a1d22d5..cc5293d 100644 --- a/requirements/tox.txt +++ b/requirements/tox.txt @@ -12,7 +12,7 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv -filelock==3.13.1 +filelock==3.13.3 # via # tox # virtualenv diff --git a/requirements/travis.txt b/requirements/travis.txt index 04ec893..06902e6 100644 --- a/requirements/travis.txt +++ b/requirements/travis.txt @@ -30,7 +30,7 @@ distlib==0.3.8 # virtualenv docopt==0.6.2 # via coveralls -filelock==3.13.1 +filelock==3.13.3 # via # -r requirements/tox.txt # tox