From 6109a1cb8015e2b0003c1741762b75e3d31200fc Mon Sep 17 00:00:00 2001 From: Johan Castiblanco Date: Mon, 29 Jan 2024 19:38:59 -0500 Subject: [PATCH] fix: add allowd index for delete progress The function validate_args https://github.com/openedx/edx-platform/blob/open-release/palm.master/cms/djangoapps/contentstore/views/tabs.py#L233 only allow num >=1 --- cms/djangoapps/contentstore/views/tests/test_tabs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/djangoapps/contentstore/views/tests/test_tabs.py b/cms/djangoapps/contentstore/views/tests/test_tabs.py index d2266933982f..4e219720fac0 100644 --- a/cms/djangoapps/contentstore/views/tests/test_tabs.py +++ b/cms/djangoapps/contentstore/views/tests/test_tabs.py @@ -191,7 +191,7 @@ def test_delete(self): tabs.primitive_delete(course, 6) assert course.tabs[1] != {'type': 'dates', 'name': 'Dates'} - tabs.primitive_delete(course, -2) + tabs.primitive_delete(course, len(course.tabs) - 2) assert {'type': 'progress'} not in course.tabs # Check that dates has shifted up assert course.tabs[1] == {'type': 'dates', 'name': 'Dates'}