def push_to_studio(cls, request, course_run, create=False, old_course_run_key=None): if course_run.course.partner.studio_url: api = StudioAPI(course_run.course.partner.studio_api_client) api.push_to_studio(course_run, create, old_course_run_key, user=request.user) else: log.info('Not pushing course run info for %s to Studio as partner %s has no studio_url set.', course_run.key, course_run.course.partner.short_code)
def update_course_run_image_in_studio(cls, course_run): if course_run.course.partner.studio_url: api = StudioAPI(course_run.course.partner.studio_api_client) api.update_course_run_image_in_studio(course_run) else: log.info('Not updating course run image for %s to Studio as partner %s has no studio_url set.', course_run.key, course_run.course.partner.short_code)
def setUp(self): super().setUp() self.mock_access_token() self.api = StudioAPI(self.partner) self.studio_url = self.partner.studio_url
def setUp(self): super().setUp() self.client = mock.Mock() self.api = StudioAPI(self.client)