def test_update_course_cert_available_date(self, mock_client): with mock.patch( TASKS_MODULE + '.post_course_certificate_configuration') as update_posted: tasks.update_credentials_course_certificate_configuration_available_date( self.course_id, self.available_date) update_posted.assert_called_once()
def test_course_with_two_paid_modes(self, mock_client): CourseModeFactory.create(course_id=self.course.id, mode_slug='professional') with mock.patch(TASKS_MODULE + '.post_course_certificate_configuration') as update_posted: tasks.update_credentials_course_certificate_configuration_available_date( self.course_id, self.available_date ) update_posted.assert_not_called()