From f1ff90dc3e7e5943f6f62984db494e0201c6b5a9 Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Tue, 23 May 2023 18:15:14 -0700 Subject: [PATCH] fix: failing test, not really sure why this worked before without modulestore.update_item() --- lms/djangoapps/gating/tests/test_integration.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lms/djangoapps/gating/tests/test_integration.py b/lms/djangoapps/gating/tests/test_integration.py index ffa9ef243f..3b399e1b89 100644 --- a/lms/djangoapps/gating/tests/test_integration.py +++ b/lms/djangoapps/gating/tests/test_integration.py @@ -52,11 +52,9 @@ class TestGatedContent(MilestonesTestCaseMixin, SharedModuleStoreTestCase): org='edX', number='EDX101', run='EDX101_RUN1', - display_name='edX 101' - ) - with modulestore().bulk_operations(course.id): - course.enable_subsection_gating = True - grading_policy = { + display_name='edX 101', + enable_subsection_gating=True, + grading_policy={ "GRADER": [{ "type": "Homework", "min_count": 3, @@ -64,10 +62,9 @@ class TestGatedContent(MilestonesTestCaseMixin, SharedModuleStoreTestCase): "short_label": "HW", "weight": 1.0 }] - } - course.grading_policy = grading_policy - course.save() - + }, + ) + with modulestore().bulk_operations(course.id): # create chapter cls.chapter1 = BlockFactory.create( parent=course,