tcms.testcases.models module

class tcms.testcases.models.Bug(id, bug_id, case_run, case, bug_system, summary, description)[source]

Bases: tcms.core.models.TCMSActionModel

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

bug_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

bug_system

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

bug_system_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

case

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

case_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

case_run

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

case_run_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

description

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_full_url()[source]
get_name()[source]
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
summary

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

unique_error_message(model_class, unique_check)[source]

Specific to invalid bug id

class tcms.testcases.models.BugSystem(*args, **kwargs)[source]

Bases: tcms.core.models.TCMSActionModel

This model describes a bug tracking system used in Kiwi TCMS. Fields below can be configured via the admin interface and their meaning is:

  1. name: a visual name for this bug tracker, e.g. `Kiwi TCMS GitHub’;

  2. description: a longer description shown in the admin;

  3. url_reg_exp: shown as URL format string in the UI - a format string used to construct URLs from bug IDs;

  4. validate_reg_exp: regular expression used for bug ID validation;

  5. tracker_type: a select menu to specify what kind of external system we interface with, e.g. Bugzilla, JIRA, others; The available options for this field are automatically populated by Kiwi TCMS;

    Warning

    Once this field is set it can’t be reset to NULL. Although Kiwi TCMS takes care to handle misconfigurations we advise you to configure your API credentials properly!

  6. base_url: base URL of this bug tracker. This is used to construct other links to the issue tracker, e.g. link to view multiple bugs at once or when a user tries to report a bug directly from a TestCase. The browser will open another window with pre-defined values based on the test case being executed and the type of the external issue tracking system.

    Warning

    If this field is left empty funtionality that depends on it will be disabled!

  7. api_url, api_username, api_password: configuration for an internal RPC object that communicate to the issue tracking system when necessary. Depending on the actual type of IT we’re interfacing with some of these values may not be necessary. Refer to tcms.issuetracker.types for more information!

    Warning

    This is saved as plain-text in the database because it needs to be passed to the internal RPC object!

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

api_password

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

api_url

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

api_username

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

base_url

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

bug_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

description

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

classmethod get_by_id(system_id)[source]
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
tracker_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

url_reg_exp

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

validate_reg_exp

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class tcms.testcases.models.Category(id, name, product, description)[source]

Bases: tcms.core.models.TCMSActionModel

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

category_case

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

description

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
product

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

product_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class tcms.testcases.models.NoneText[source]

Bases: object

action = ''
author = None
breakdown = ''
case_text_version = 0
create_date = datetime.datetime(2018, 12, 9, 21, 17, 2, 705053)
effect = ''
classmethod serialize()[source]
setup = ''
class tcms.testcases.models.TestCase(case_id, create_date, is_automated, is_automated_proposed, script, arguments, extra_link, summary, requirement, alias, notes, case_status, category, priority, author, default_tester, reviewer)[source]

Bases: tcms.core.models.TCMSActionModel

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

add_bug(bug_id, bug_system_id, summary=None, description=None, case_run=None, bz_external_track=False)[source]
add_component(component)[source]
add_tag(tag)[source]
add_text(action, effect, setup, breakdown, author=None, create_date=datetime.datetime(2018, 12, 9, 21, 17, 2, 707788), case_text_version=1)[source]
add_to_plan(plan)[source]
alias

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

arguments

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

author

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

author_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

case_bug

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

case_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

case_run

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

case_status

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

case_status_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

category

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

category_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

clear_components()[source]
component

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

classmethod create(author, values)[source]

Create the case element based on models/forms.

create_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

default_tester

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

default_tester_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

email_settings

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

emailing

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_bugs()[source]
get_component_names()[source]
get_components()[source]
get_is_automated_form_value()[source]
get_is_automated_status()[source]
get_next_by_create_date(*, field=<django.db.models.fields.DateTimeField: create_date>, is_next=True, **kwargs)
get_previous_and_next(pk_list)[source]
get_previous_by_create_date(*, field=<django.db.models.fields.DateTimeField: create_date>, is_next=False, **kwargs)
get_text_with_version(case_text_version=None)[source]
history = <simple_history.manager.HistoryManager object>
is_automated

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_automated_proposed

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

latest_text(text_required=True)[source]
latest_text_version()[source]
classmethod list(query, plan=None)[source]

List the cases with request

notes

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
plan

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

priority

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

priority_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

remove_bug(bug_id, run_id=None)[source]
remove_component(component)[source]
remove_plan(plan)[source]
remove_tag(tag)[source]
requirement

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

reviewer

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

reviewer_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

script

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

summary

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

tag

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

testcasecomponent_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

testcaseplan_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

testcasetag_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

text

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

classmethod to_xmlrpc(query=None)[source]

Convert the query set for XMLRPC

class tcms.testcases.models.TestCaseComponent(id, case, component)[source]

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

case

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

case_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

component

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

component_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
class tcms.testcases.models.TestCaseEmailSettings(id, case, notify_on_case_update, notify_on_case_delete, auto_to_case_author, auto_to_case_tester, auto_to_run_manager, auto_to_run_tester, auto_to_case_run_assignee, cc_list)[source]

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

add_cc(email_addrs)[source]

Add email addresses to CC list

Arguments: - email_addrs: str or list, holding one or more email addresses

auto_to_case_author

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

auto_to_case_run_assignee

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

auto_to_case_tester

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

auto_to_run_manager

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

auto_to_run_tester

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

case

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

case_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

cc_list

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_cc_list()[source]

Return the whole CC list

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

notify_on_case_delete

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

notify_on_case_update

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
remove_cc(email_addrs)[source]

Remove one or more email addresses from EmailSettings’ CC list

If any email_addr is unknown, remove_cc will keep quiet.

Arguments: - email_addrs: str or list, holding one or more email addresses

class tcms.testcases.models.TestCasePlan(id, plan, case, sortkey)[source]

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

case

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

case_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
plan

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

plan_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

sortkey

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class tcms.testcases.models.TestCaseStatus(id, name, description)[source]

Bases: tcms.core.models.TCMSActionModel

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

description

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

classmethod get_confirmed()[source]
classmethod get_proposed()[source]
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_confirmed()[source]
name
objects = <django.db.models.manager.Manager object>
classmethod string_to_instance(name)[source]
testcase_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

untranslated(fieldname)
class tcms.testcases.models.TestCaseTag(id, tag, case)[source]

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

case

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

case_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
tag

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

tag_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class tcms.testcases.models.TestCaseText(id, case, case_text_version, author, create_date, action, effect, setup, breakdown)[source]

Bases: tcms.core.models.TCMSActionModel

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

action

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

author

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

author_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

breakdown

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

case

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

case_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

case_text_version

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

create_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

effect

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_create_date(*, field=<django.db.models.fields.DateTimeField: create_date>, is_next=True, **kwargs)
get_previous_by_create_date(*, field=<django.db.models.fields.DateTimeField: create_date>, is_next=False, **kwargs)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
setup

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.