diff --git a/lms/djangoapps/mfe_config_api/tests/test_views.py b/lms/djangoapps/mfe_config_api/tests/test_views.py index 85fdeb2005d7..fedb363ef99c 100644 --- a/lms/djangoapps/mfe_config_api/tests/test_views.py +++ b/lms/djangoapps/mfe_config_api/tests/test_views.py @@ -13,6 +13,7 @@ from rest_framework.test import APITestCase from lms.djangoapps.mfe_config_api.views import mfe_name_to_app_id +from openedx.core.release import doc_version # Default legacy configuration values, used in tests to build a correct expected response default_legacy_config = { @@ -24,6 +25,8 @@ "ENABLE_COURSE_DISCOVERY": False, } +INSTRUCTOR_SUPPORT_URL = f"https://docs.openedx.org/en/{doc_version()}/educators/index.html" + @ddt.ddt class MFEConfigTestCase(APITestCase): @@ -313,7 +316,7 @@ def side_effect(key, default=None): data = response.json() self.assertEqual( # noqa: PT009 data["SUPPORT_URL"], - "https://docs.openedx.org/en/latest/educators/index.html", + INSTRUCTOR_SUPPORT_URL, ) @patch("lms.djangoapps.mfe_config_api.views.configuration_helpers") @@ -787,7 +790,7 @@ def side_effect(key, default=None): instructor = apps_by_id["org.openedx.frontend.app.instructorDashboard"] self.assertEqual( # noqa: PT009 instructor["config"]["SUPPORT_URL"], - "https://docs.openedx.org/en/latest/educators/index.html", + INSTRUCTOR_SUPPORT_URL, ) @patch("lms.djangoapps.mfe_config_api.views.configuration_helpers")