def suite(request, job, pk): job = get_object_or_404(TestJob, pk=job) check_request_auth(request, job) test_suite = get_object_or_404(TestSuite, name=pk, job=job) data = SuiteView(request, model=TestCase, table_class=SuiteTable) suite_table = SuiteTable(data.get_table_data().filter(suite=test_suite)) RequestConfig(request, paginate={ "per_page": suite_table.length }).configure(suite_table) template = loader.get_template("lava_results_app/suite.html") return HttpResponse( template.render( { 'bread_crumb_trail': BreadCrumbTrail.leading_to(suite, pk=pk, job=job.id), 'job': job, 'job_link': pklink(job), 'content_type_id': ContentType.objects.get_for_model(TestCase).id, 'suite_name': pk, 'suite_table': suite_table, 'bug_links': BugLink.objects.filter( object_id=test_suite.id, content_type_id=ContentType.objects.get_for_model( TestSuite).id, ) }, request=request))
def suite(request, job, pk): job = get_restricted_job(request.user, pk=job, request=request) test_suite = get_object_or_404(TestSuite, name=pk, job=job) data = SuiteView(request, model=TestCase, table_class=SuiteTable) suite_table = SuiteTable(data.get_table_data().filter(suite=test_suite)) RequestConfig(request, paginate={"per_page": suite_table.length}).configure( suite_table ) template = loader.get_template("lava_results_app/suite.html") return HttpResponse( template.render( { "bread_crumb_trail": BreadCrumbTrail.leading_to( suite, pk=pk, job=job.id ), "job": job, "job_link": pklink(job), "testsuite_content_type_id": ContentType.objects.get_for_model( TestSuite ).id, "suite_name": pk, "suite_id": test_suite.id, "suite_table": suite_table, "bug_links": BugLink.objects.filter( object_id=test_suite.id, content_type_id=ContentType.objects.get_for_model(TestSuite).id, ), }, request=request, ) )
def suite(request, job, pk): job = get_object_or_404(TestJob, pk=job) test_suite = get_object_or_404(TestSuite, name=pk, job=job) data = SuiteView(request, model=TestCase, table_class=SuiteTable) suite_table = SuiteTable( data.get_table_data().filter(suite=test_suite) ) RequestConfig(request, paginate={"per_page": suite_table.length}).configure(suite_table) return render_to_response( "lava_results_app/suite.html", { 'bread_crumb_trail': BreadCrumbTrail.leading_to(suite, pk=pk, job=job.id), 'job': job, 'job_link': pklink(job), 'suite_name': pk, 'suite_table': suite_table, }, RequestContext(request))