def test_template_include_course_info(self, template_mock, bulk_job_mock, SDK_CONTEXT, update_course, **kwargs):
     bulk_job_mock.return_value = Mock(template_canvas_course_id=template_id)
     template_mock.return_value = Mock(include_course_info=True)
     update_syllabus_body(self.course_job)
     update_course.assert_called_with(
         SDK_CONTEXT,
         canvas_course_id,
         course_syllabus_body=course_syllabus_body
     )
 def test_default_template_include_course_info(self, template_mock, get_default_template_for_school, SDK_CONTEXT,
                                               update_course, **kwargs):
     template_mock.return_value = Mock(include_course_info=True)
     get_default_template_for_school.return_value = Mock(template_id=template_id)
     update_syllabus_body(self.course_job)
     update_course.assert_called_with(
         SDK_CONTEXT,
         canvas_course_id,
         course_syllabus_body=course_syllabus_body
     )
 def test_template_not_include_course_info(self, template_mock, bulk_job_mock, SDK_CONTEXT, update_course, **kwargs):
     bulk_job_mock.return_value = Mock(template_canvas_course_id=template_id)
     template_mock.return_value = Mock(include_course_info=False)
     update_syllabus_body(self.course_job)
     assert not update_course.called
 def test_no_template(self, bulk_job_mock, update_course, **kwargs):
     bulk_job_mock.return_value = Mock(template_canvas_course_id=None)
     update_syllabus_body(self.course_job)
     assert not update_course.called
 def test_default_template_not_include_course_info(self, template_mock, update_course,
                                                   get_default_template_for_school, **kwargs):
     get_default_template_for_school.return_value = Mock(template_id=template_id)
     template_mock.return_value = Mock(include_course_info=False)
     update_syllabus_body(self.course_job)
     assert not update_course.called
 def test_no_default_template(self, update_course, get_default_template_for_school, **kwargs):
     get_default_template_for_school.side_effect = NoTemplateExistsForSchool(sis_course_id)
     update_syllabus_body(self.course_job)
     assert not update_course.called