tcms.testplans.views module

class tcms.testplans.views.DeleteCasesView(**kwargs)[source]

Bases: django.views.generic.base.View

Delete selected cases from plan

post(request, plan_id)[source]
class tcms.testplans.views.LinkCasesSearchView(**kwargs)[source]

Bases: django.views.generic.base.View

Search cases for linking to plan

get(request, plan_id)[source]
post(request, plan_id)[source]
template_name = 'plan/search_case.html'
class tcms.testplans.views.LinkCasesView(**kwargs)[source]

Bases: django.views.generic.base.View

Link cases to plan

post(request, plan_id)[source]
class tcms.testplans.views.ReorderCasesView(**kwargs)[source]

Bases: django.views.generic.base.View

Reorder cases

http_method_names = ['post']
post(request, plan_id)[source]
class tcms.testplans.views.UpdateParentView(**kwargs)[source]

Bases: django.views.generic.base.View

Updates TestPlan.parent. Called from the front-end.

dispatch(request, *args, **kwargs)
http_method_names = ['post']
post(request)[source]
tcms.testplans.views.attachment(request, plan_id, template_name='plan/attachment.html')[source]

Manage attached files

tcms.testplans.views.calculate_stats_for_testplans(plans)[source]

Attach the number of cases and runs for each TestPlan

Arguments: - plans: the queryset of TestPlans

Return value: A list of TestPlans, each of which is attached the statistics which is with prefix cal meaning calculation result.

tcms.testplans.views.choose_run(request, plan_id)[source]

Choose one run to add cases

tcms.testplans.views.clone(request)[source]

Clone testplan

tcms.testplans.views.edit(request, plan_id, template_name='plan/edit.html')[source]

Edit test plan view

tcms.testplans.views.get(request, plan_id, slug=None, template_name='plan/get.html')[source]

Display the plan details.

tcms.testplans.views.get_all(request)[source]

Display all testplans

tcms.testplans.views.get_number_of_children_plans(plan_ids)[source]

Get the number of children plans related to each plan

Arguments: - plan_ids: a tuple or list of TestPlans’ id

Return value: Return value is an dict object, where key is plan_id and the value is the total count.

tcms.testplans.views.get_number_of_plans_cases(plan_ids)[source]

Get the number of cases related to each plan

Arguments: - plan_ids: a tuple or list of TestPlans’ id

Return value: Return value is an dict object, where key is plan_id and the value is the total count.

tcms.testplans.views.get_number_of_plans_runs(plan_ids)[source]

Get the number of runs related to each plan

Arguments: - plan_ids: a tuple or list of TestPlans’ id

Return value: Return value is an dict object, where key is plan_id and the value is the total count.

tcms.testplans.views.new(request)[source]

New testplan

tcms.testplans.views.printable(request)[source]

Create the printable copy for plan

tcms.testplans.views.search(request)[source]
tcms.testplans.views.update_plan_email_settings(test_plan, form)[source]

Update test plan’s email settings