Commit 1b2fec21 by Tyler Hallada

Fix tests

parent 623ea5eb
......@@ -427,17 +427,20 @@ class PersistentSubsectionGrade(DeleteGradesMixin, TimeStampedModel):
# params['earned_graded'] = override.earned_graded_override
# if override.possible_graded_override is not None:
# params['possible_graded'] = override.possible_graded_override
log.info(u"EDUCATOR-1127: Subsection grade for user {user_id} on subsection {usage_key} in course "
u"{course_key} would be overridden with params: {params}".format(
user_id=unicode(user_id),
usage_key=unicode(usage_key),
course_key=unicode(usage_key.course_key),
params=unicode({
'earned_all': override.earned_all_override,
'possible_all': override.possible_all_override,
'earned_graded': override.earned_graded_override,
'possible_graded': override.possible_graded_override
}))
log.info(
u"EDUCATOR-1127: Subsection grade for user {user_id} on subsection {usage_key} in course "
u"{course_key} would be overridden with params: {params}"
.format(
user_id=unicode(user_id),
usage_key=unicode(usage_key),
course_key=unicode(usage_key.course_key),
params=unicode({
'earned_all': override.earned_all_override,
'possible_all': override.possible_all_override,
'earned_graded': override.earned_graded_override,
'possible_graded': override.possible_graded_override
})
)
)
except PersistentSubsectionGradeOverride.DoesNotExist:
pass
......
......@@ -312,8 +312,9 @@ class PersistentSubsectionGradeTest(GradesModelTestCase):
override = PersistentSubsectionGradeOverride(grade=grade, earned_all_override=0.0, earned_graded_override=0.0)
override.save()
grade = PersistentSubsectionGrade.update_or_create_grade(**self.params)
self.assertEqual(grade.earned_all, 0.0)
self.assertEqual(grade.earned_graded, 0.0)
# EDUCATOR-1127 Override is not enabled yet, change to 0.0 when enabled
self.assertEqual(grade.earned_all, 6.0)
self.assertEqual(grade.earned_graded, 6.0)
def _assert_tracker_emitted_event(self, tracker_mock, grade):
"""
......
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