From 640a07b9ec658a88965a85dee0cd374d45661268 Mon Sep 17 00:00:00 2001 From: Vladimir Chernyshev Date: Sun, 10 Dec 2023 16:35:02 +0500 Subject: [PATCH] Add func delete_test_run --- adaptavist/adaptavist.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/adaptavist/adaptavist.py b/adaptavist/adaptavist.py index c25949f..9b67962 100644 --- a/adaptavist/adaptavist.py +++ b/adaptavist/adaptavist.py @@ -656,7 +656,18 @@ def clone_test_run(self, test_run_key: str, test_run_name: str = "", **kwargs: A self.edit_test_plan(test_plan_key=test_plan["key"], test_runs=[key]) return key + + def delete_test_run(self, test_run_key: str) -> bool: + """ + Delete given test run. + :param test_run_key: Test run key to be deleted. ex. "TEST-R2" + :returns: True if succeeded, False if not + """ + request_url = f"{self._adaptavist_api_url}/testrun/{test_run_key}" + self._logger.debug("Deleting test case %s)", test_run_key) + return bool(self._delete(request_url)) + def get_test_execution_results(self, last_result_only: bool = True) -> List[Dict[str, Any]]: """ Get all test results.