controllers.py 文件源码

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

项目:sample-platform 作者: CCExtractor 项目源码 文件源码
def generate_diff(test_id, regression_test_id, output_id):
    from run import config
    if request.is_xhr:
        # Fetch test
        result = TestResultFile.query.filter(and_(
            TestResultFile.test_id == test_id,
            TestResultFile.regression_test_id == regression_test_id,
            TestResultFile.regression_test_output_id == output_id)).first()
        if result is not None:
            path = os.path.join(
                config.get('SAMPLE_REPOSITORY', ''), 'TestResults')
            return result.generate_html_diff(path)
        abort(404)
    abort(403, 'generate_diff')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号