def setUp(self): super(LMSPublisherTests, self).setUp() self.course = CourseFactory(verification_deadline=datetime.datetime.now() + datetime.timedelta(days=7)) self.course.create_or_update_seat('honor', False, 0, self.partner) self.course.create_or_update_seat('verified', True, 50, self.partner) self.publisher = LMSPublisher() self.error_message = u'Failed to publish commerce data for {course_id} to LMS.'.format( course_id=self.course.id )
def setUp(self): super(LMSPublisherTests, self).setUp() httpretty.enable() self.mock_access_token_response() self.course = CourseFactory(verification_deadline=timezone.now() + datetime.timedelta(days=7), site=self.site) self.course.create_or_update_seat('honor', False, 0, self.partner) self.course.create_or_update_seat('verified', True, 50, self.partner) self.publisher = LMSPublisher() self.error_message = 'Failed to publish commerce data for {course_id} to LMS.'.format(course_id=self.course.id)
def publish_to_lms(self): """ Publish Course and Products to LMS. """ return LMSPublisher().publish(self)
def publish_to_lms(self, access_token=None): """ Publish Course and Products to LMS. """ return LMSPublisher().publish(self, access_token=access_token)