tcms.testcases.views module

class tcms.testcases.views.CloneTestCaseView(**kwargs)[source]

Bases: View

Clone one case or multiple case into other plan or plans

dispatch(request, *args, **kwargs)
get(request)[source]
http_method_names = ['get', 'post']
post(request)[source]
template_name = 'testcases/clone.html'
class tcms.testcases.views.EditTestCaseView(**kwargs)[source]

Bases: UpdateView

dispatch(request, *args, **kwargs)
form_class

alias of TestCaseForm

form_valid(form)[source]

If the form is valid, save the associated model.

get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form(form_class=None)[source]

Return an instance of the form to be used in this view.

get_initial()[source]

Return the initial data to use for forms on this view.

model

alias of TestCase

template_name = 'testcases/mutable.html'
class tcms.testcases.views.NewCaseView(**kwargs)[source]

Bases: CreateView

dispatch(request, *args, **kwargs)
form_class

alias of TestCaseForm

form_valid(form)[source]

If the form is valid, save the associated model.

get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form(form_class=None)[source]

Return an instance of the form to be used in this view.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

model

alias of TestCase

template_name = 'testcases/mutable.html'
class tcms.testcases.views.TestCaseGetView(**kwargs)[source]

Bases: DetailView

dispatch(request, *args, **kwargs)
get_context_data(**kwargs)[source]

Insert the single object into the context dict.

http_method_names = ['get']
model

alias of TestCase

template_name = 'testcases/get.html'
class tcms.testcases.views.TestCaseSearchView(**kwargs)[source]

Bases: TemplateView

Shows the search form which uses JSON RPC to fetch the results

dispatch(request, *args, **kwargs)
get_context_data(**kwargs)[source]
template_name = 'testcases/search.html'
tcms.testcases.views.plan_from_request_or_none(request)[source]

Get TestPlan from REQUEST

This method relies on the existence of from_plan within REQUEST.