test_management.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:edx-enterprise 作者: edx 项目源码 文件源码
def test_transmit_course_metadata_task_no_catalog(self):
        """
        Test the data transmission task with enterprise customer that has no course catalog.
        """
        uuid = str(self.enterprise_customer.uuid)
        course_run_ids = ['course-v1:edX+DemoX+Demo_Course']
        self.mock_ent_courses_api_with_pagination(
            enterprise_uuid=uuid,
            course_run_ids=course_run_ids
        )
        integrated_channel_enterprise = self.sapsf.enterprise_customer
        integrated_channel_enterprise.catalog = None
        integrated_channel_enterprise.save()

        with LogCapture(level=logging.INFO) as log_capture:
            call_command('transmit_course_metadata', '--catalog_user', self.user.username)

            # Because there are no EnterpriseCustomers with a catalog, the process will end early.
            assert not log_capture.records
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号