tcms.rpc.api.testplan module¶
-
tcms.rpc.api.testplan.
add_attachment
(plan_id, filename, b64content, **kwargs)[source]¶ -
RPC TestPlan.add_attachment(plan_id, filename, b64content)
Add attachment to the given TestPlan.
Parameters:
-
-
tcms.rpc.api.testplan.
add_case
(plan_id, case_id)[source]¶ -
RPC TestPlan.add_case(plan_id, case_id)
Link test case to the given plan.
Parameters: Returns: Serialized
tcms.testcases.models.TestCase
object augmented with a ‘sortkey’ valueReturn type: Raises: - TestPlan.DoesNotExit or TestCase.DoesNotExist – if objects specified by PKs are missing
- PermissionDenied – if missing testcases.add_testcaseplan permission
-
-
tcms.rpc.api.testplan.
add_tag
(plan_id, tag_name, **kwargs)[source]¶ -
RPC TestPlan.add_tag(plan_id, tag_name)
Add a tag to the specified test plan.
Parameters: Raises: - PermissionDenied – if missing testplans.add_testplantag permission
- TestPlan.DoesNotExist – if object specified by PK doesn’t exist
- Tag.DoesNotExist – if missing management.add_tag permission and tag_name doesn’t exist in the database!
-
-
tcms.rpc.api.testplan.
create
(values, **kwargs)[source]¶ -
RPC TestPlan.create(values)
Create new Test Plan object and store it in the database.
Parameters: - values (dict) – Field values for
tcms.testplans.models.TestPlan
- **kwargs – Dict providing access to the current request, protocol, entry point name and handler instance from the rpc method
Returns: Serialized
tcms.testplans.models.TestPlan
objectReturn type: Raises: - PermissionDenied – if missing testplans.add_testplan permission
- ValueError – if data validation fails
Minimal parameters:
>>> values = { 'product': 61, 'product_version': 93, 'name': 'Testplan foobar', 'type': 1, 'parent': 150, 'text':'Testing TCMS', } >>> TestPlan.create(values)
- values (dict) – Field values for
-
-
tcms.rpc.api.testplan.
filter
(query=None)[source]¶ -
RPC TestPlan.filter(query)
Perform a search and return the resulting list of test plans.
Parameters: query (dict) – Field lookups for tcms.testplans.models.TestPlan
Returns: List of serialized tcms.testplans.models.TestPlan
objectsReturn type: list(dict)
-
-
tcms.rpc.api.testplan.
list_attachments
(plan_id, **kwargs)[source]¶ -
RPC TestPlan.list_attachments(plan_id)
List attachments for the given TestPlan.
Parameters: - plan_id (int) – PK of TestPlan to inspect
- **kwargs – Dict providing access to the current request, protocol, entry point name and handler instance from the rpc method
Returns: A list containing information and download URLs for attachements
Return type: Raises: TestPlan.DoesNotExit – if object specified by PK is missing
-
-
tcms.rpc.api.testplan.
remove_tag
(plan_id, tag_name)[source]¶ -
RPC TestPlan.remove_tag(plan_id, tag_name)
Remove tag from the specified test plan.
Parameters: Raises: - PermissionDenied – if missing testplans.delete_testplantag permission
- DoesNotExist – if objects specified don’t exist
-
-
tcms.rpc.api.testplan.
tree
(plan_id)[source]¶ -
RPC TestPlan.tree(plan_id)
Returns a list of the ancestry tree for the given TestPlan in a depth-first order!
Parameters: plan_id (int) – PK of TestPlan to inspect Returns: A DFS ordered list of all test plans in the family tree starting from the root of the tree Return type: list Raises: TestPlan.DoesNotExit – if object specified by PK is missing
-
-
tcms.rpc.api.testplan.
update
(plan_id, values)[source]¶ -
RPC TestPlan.update(plan_id, values)
Update the fields of the selected test plan.
Parameters: - plan_id (int) – PK of TestPlan to modify
- values (dict) – Field values for
tcms.testplans.models.TestPlan
Returns: Serialized
tcms.testplans.models.TestPlan
objectReturn type: Raises: - TestPlan.DoesNotExist – if object specified by PK doesn’t exist
- PermissionDenied – if missing testplans.change_testplan permission
- ValueError – if validations fail
-
-
tcms.rpc.api.testplan.
update_case_order
(plan_id, case_id, sortkey)[source]¶ -
RPC TestPlan.update_case_order(plan_id, case_id, sortkey)
Update sortkey which controls display order of the given test case in the given test plan.
Parameters: Raises: PermissionDenied – if missing testcases.delete_testcaseplan permission
-