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,