diff --git a/README.md b/README.md index 589884f..e7a52cc 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,7 @@ compatibility) ##### Test Cycles - `GET` test cycle by test cycle id +- `DELETE` test cycle by test cycle id ##### Test Plans - `POST` a new test cycle to a test plan by test plan id diff --git a/py_jama_rest_client/client.py b/py_jama_rest_client/client.py index 0d2480c..36f5a41 100644 --- a/py_jama_rest_client/client.py +++ b/py_jama_rest_client/client.py @@ -966,6 +966,24 @@ def delete_relationships(self, relationship_id): JamaClient.__handle_response_status(response) return response.status_code + def delete_test_cycle(self, test_cycle_id): + """ + This method will delete a test cycle specified by the test cycle id. + + Args: + test_cycle_id: the api id of the test cycle to delete + + Returns: The success status code. + """ + resource_path = 'testcycles/' + str(test_cycle_id) + try: + response = self.__core.delete(resource_path) + except CoreException as err: + py_jama_rest_client_logger.error(err) + raise APIException(str(err)) + JamaClient.__handle_response_status(response) + return response.status_code + def patch_item(self, item_id, patches): """ This method will patch an item.