Source code for tcms.rpc.api.forms.testcase

from django import forms

from tcms.core.forms.fields import UserField
from tcms.rpc.api.forms import UpdateModelFormMixin
from tcms.testcases.models import Category, TestCase


[docs] class NewForm(forms.ModelForm):
[docs] class Meta: model = TestCase exclude = ( # pylint: disable=modelform-uses-exclude "reviewer", "tag", "component", "plan", )
[docs] class UpdateForm(UpdateModelFormMixin, forms.ModelForm):
[docs] class Meta: model = TestCase exclude = ("tag", "component", "plan") # pylint: disable=modelform-uses-exclude
default_tester = UserField() author = UserField() reviewer = UserField()
[docs] class CategoryForm(forms.ModelForm):
[docs] class Meta: model = Category fields = "__all__"