@app.route('/tests/id/<test_id>')
def view_test(test_id):
    try:
        test = db.get_test(test_id)
    except UnknownTestError:
        return make_response('Unknown Test {test_id}.'.format(test_id=test_id), 404)
    artifacts = db.get_test_artifacts(test_id)

    has_chart = False
    for a in artifacts:
        if ['failure','link'] in a['artifact_type']:
            # Proactively fetch non-blob artifacts:
            a['artifact'] = db.get_test_artifact_data(test_id, a['artifact_type'], a['name'])
        if a['artifact_type'] == 'stats':
            has_chart = True

    return render_template('view_test.jinja2.html', test=test, artifacts=artifacts, has_chart=has_chart)
dataset/ETHPy150Open datastax/cstar_perf/frontend/cstar_perf/frontend/server/controllers.py/view_test/swapped operands of `in`