Commit 503aff25 by Tyler Hallada

Address PR comments

parent 81e8f906
...@@ -83,9 +83,9 @@ SUBSECTION_SCORE_CHANGED = Signal( ...@@ -83,9 +83,9 @@ SUBSECTION_SCORE_CHANGED = Signal(
) )
# Signal that indicates that a user's score for a subsection has been overridden. # Signal that indicates that a user's score for a subsection has been overridden.
# This signal is generated when an admin changes a user's exam attempt state to # This signal is generated when a user's exam attempt state is set to rejected or
# rejected or to verified from rejected. This signal may also be generated by any # to verified from rejected. This signal may also be sent by any other client
# other client using the GradesService to override subsections in the future. # using the GradesService to override subsections in the future.
SUBSECTION_OVERRIDE_CHANGED = Signal( SUBSECTION_OVERRIDE_CHANGED = Signal(
providing_args=[ providing_args=[
'user_id', # Integer User ID 'user_id', # Integer User ID
......
...@@ -59,6 +59,7 @@ class GradesServiceTests(ModuleStoreTestCase): ...@@ -59,6 +59,7 @@ class GradesServiceTests(ModuleStoreTestCase):
} }
def tearDown(self): def tearDown(self):
PersistentSubsectionGradeOverride.objects.all().delete() # clear out all previous overrides
self.signal_patcher.stop() self.signal_patcher.stop()
self.id_patcher.stop() self.id_patcher.stop()
self.type_patcher.stop() self.type_patcher.stop()
...@@ -157,8 +158,6 @@ class GradesServiceTests(ModuleStoreTestCase): ...@@ -157,8 +158,6 @@ class GradesServiceTests(ModuleStoreTestCase):
) )
@ddt.unpack @ddt.unpack
def test_override_subsection_grade(self, override, expected): def test_override_subsection_grade(self, override, expected):
PersistentSubsectionGradeOverride.objects.all().delete() # clear out all previous overrides
self.service.override_subsection_grade( self.service.override_subsection_grade(
user_id=self.user.id, user_id=self.user.id,
course_key_or_id=self.course.id, course_key_or_id=self.course.id,
......
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