Send signal requires sender argument

This commit is contained in:
Tyler Hallada
2017-08-02 14:07:26 -04:00
parent a6b94a2400
commit 147ca0bcf1
2 changed files with 4 additions and 0 deletions

View File

@@ -96,6 +96,7 @@ class GradesService(object):
# Signal will trigger subsection recalculation which will call PersistentSubsectionGrade.update_or_create_grade
# which will use the above override to update the grade before writing to the table.
SUBSECTION_OVERRIDE_CHANGED.send(
sender=None,
user_id=user_id,
course_id=unicode(course_key),
usage_id=unicode(usage_key),
@@ -131,6 +132,7 @@ class GradesService(object):
# which will no longer use the above deleted override, and instead return the grade to the original score from
# the actual problem responses before writing to the table.
SUBSECTION_OVERRIDE_CHANGED.send(
sender=None,
user_id=user_id,
course_id=unicode(course_key),
usage_id=unicode(usage_key),

View File

@@ -179,6 +179,7 @@ class GradesServiceTests(ModuleStoreTestCase):
self.assertEqual(
self.mock_signal.call_args,
call(
sender=None,
user_id=self.user.id,
course_id=unicode(self.course.id),
usage_id=unicode(self.subsection.location),
@@ -205,6 +206,7 @@ class GradesServiceTests(ModuleStoreTestCase):
self.assertEqual(
self.mock_signal.call_args,
call(
sender=None,
user_id=self.user.id,
course_id=unicode(self.course.id),
usage_id=unicode(self.subsection.location),