Example #1
0
def load_case(mode, id):
    id = int(id)
    if mode == 'run_single_case':
        return run_by_single(id)
    elif mode == 'run_by_module':
        pass
    elif mode == 'run_by_project':
        pass
Example #2
0
def run_test(request, mode, id):
    if request.session.get('login_status'):
        if request.method == 'GET':
            if mode == 'run_by_test':
                result = main_ate(run_by_single(id))
            elif mode == 'run_by_module':
                test_lists = run_by_module(id)
                result = get_result(test_lists)
            elif mode == 'run_by_project':
                test_lists = run_by_project(id)
                result = get_result(test_lists)
            return render_to_response('report_template.html', result)
    else:
        return HttpResponseRedirect("/api/login/")