diff --git a/lms/djangoapps/grades/tests/integration/test_events.py b/lms/djangoapps/grades/tests/integration/test_events.py index c177e9a124..b6ce701130 100644 --- a/lms/djangoapps/grades/tests/integration/test_events.py +++ b/lms/djangoapps/grades/tests/integration/test_events.py @@ -8,7 +8,6 @@ from lms.djangoapps.instructor.enrollment import reset_student_attempts from lms.djangoapps.instructor_task.api import submit_rescore_problem_for_student from mock import patch from openedx.core.djangolib.testing.utils import get_mock_request -from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory @@ -28,8 +27,10 @@ class GradesEventIntegrationTest(ProblemSubmissionTestMixin, SharedModuleStoreTe of the grading infrastructure. """ @classmethod - def setUpClass(cls): - super(GradesEventIntegrationTest, cls).setUpClass() + def reset_course(cls): + """ + Sets up the course anew. + """ with cls.store.default_store(ModuleStoreEnum.Type.split): cls.course = CourseFactory.create() cls.chapter = ItemFactory.create( @@ -63,6 +64,7 @@ class GradesEventIntegrationTest(ProblemSubmissionTestMixin, SharedModuleStoreTe ) def setUp(self): + self.reset_course() super(GradesEventIntegrationTest, self).setUp() self.request = get_mock_request(UserFactory()) self.student = self.request.user