Commit fe545e05 by Toby Lawrence

Quality fixes.

parent e2cbb547
...@@ -13,32 +13,32 @@ class TestHandleItemDeleted(ModuleStoreTestCase, MilestonesTestCaseMixin): ...@@ -13,32 +13,32 @@ class TestHandleItemDeleted(ModuleStoreTestCase, MilestonesTestCaseMixin):
""" """
Test case for handle_score_changed django signal handler Test case for handle_score_changed django signal handler
""" """
def setUp(cls): def setUp(self):
""" """
Initial data setup Initial data setup
""" """
super(TestHandleItemDeleted, cls).setUp() super(TestHandleItemDeleted, self).setUp()
cls.course = CourseFactory.create() self.course = CourseFactory.create()
cls.course.enable_subsection_gating = True self.course.enable_subsection_gating = True
cls.course.save() self.course.save()
cls.chapter = ItemFactory.create( self.chapter = ItemFactory.create(
parent=cls.course, parent=self.course,
category="chapter", category="chapter",
display_name="Chapter" display_name="Chapter"
) )
cls.open_seq = ItemFactory.create( self.open_seq = ItemFactory.create(
parent=cls.chapter, parent=self.chapter,
category='sequential', category='sequential',
display_name="Open Sequential" display_name="Open Sequential"
) )
cls.gated_seq = ItemFactory.create( self.gated_seq = ItemFactory.create(
parent=cls.chapter, parent=self.chapter,
category='sequential', category='sequential',
display_name="Gated Sequential" display_name="Gated Sequential"
) )
gating_api.add_prerequisite(cls.course.id, cls.open_seq.location) gating_api.add_prerequisite(self.course.id, self.open_seq.location)
gating_api.set_required_content(cls.course.id, cls.gated_seq.location, cls.open_seq.location, 100) gating_api.set_required_content(self.course.id, self.gated_seq.location, self.open_seq.location, 100)
@patch('contentstore.signals.gating_api.set_required_content') @patch('contentstore.signals.gating_api.set_required_content')
@patch('contentstore.signals.gating_api.remove_prerequisite') @patch('contentstore.signals.gating_api.remove_prerequisite')
......
...@@ -122,6 +122,7 @@ class TestSaveSubsToStore(SharedModuleStoreTestCase): ...@@ -122,6 +122,7 @@ class TestSaveSubsToStore(SharedModuleStoreTestCase):
cls.content_location_unjsonable = StaticContent.compute_location(cls.course.id, filename_unjsonable) cls.content_location_unjsonable = StaticContent.compute_location(cls.course.id, filename_unjsonable)
def setUp(self): def setUp(self):
super(TestSaveSubsToStore, self).setUp()
self.addCleanup(self.clear_subs_content) self.addCleanup(self.clear_subs_content)
self.clear_subs_content() self.clear_subs_content()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment