Пример #1
0
 def test_outcome_with_outdated_version(self):
     self.assignment.version_number = 2
     self.assignment.save()
     tasks.send_composite_outcome(
         self.user.id, six.text_type(self.course_key), self.assignment.id, 1
     )
     self.assertEqual(self.course_grade_mock.call_count, 0)
Пример #2
0
 def test_outcome_with_score_score(self, earned, possible, expected):
     self.course_grade.score_for_module = MagicMock(return_value=(earned,
                                                                  possible))
     tasks.send_composite_outcome(self.user.id, str(self.course_key),
                                  self.assignment.id, 1)
     self.send_score_update_mock.assert_called_once_with(
         self.assignment, expected)
Пример #3
0
 def test_outcome_with_outdated_version(self):
     self.assignment.version_number = 2
     self.assignment.save()
     tasks.send_composite_outcome(self.user.id, str(self.course_key),
                                  self.assignment.id, 1)
     assert self.course_grade_mock.call_count == 0