Пример #1
0
 def test_dont_check_marketo_complete_if_disabled_for_microsite(self):
     with patch('edxmarketo.signals.handlers.cached_check_marketo_complete') as dummy_cached_check:
         smodule = self.student_modules['student1_yeslead']['smod_7']
         grading_event.send(sender=smodule, module=smodule, grade=smodule.grade, max_grade=smodule.max_grade)
         self.assertEquals(0, dummy_cached_check.call_count)
Пример #2
0
 def test_handler_responds_to_signal(self):
     with mock_signal_receiver(grading_event) as dummy_handler:
         smodule = self.student_modules['student1_yeslead']['smod_7']
         grading_event.send(sender=smodule, module=smodule, grade=1, max_grade=1)
         dummy_handler.assert_called_once_with(signal=grading_event, sender=smodule, module=smodule, grade=1, max_grade=1)