From ac2050b45cb21aa790f17f50a3e36db2933bd573 Mon Sep 17 00:00:00 2001 From: Kamforka Date: Tue, 25 Feb 2025 18:51:31 +0100 Subject: [PATCH] #398 - Remove `update_share` method from case endpoint --- tests/test_case_endpoint.py | 13 ------------- thehive4py/endpoints/case.py | 5 ----- 2 files changed, 18 deletions(-) diff --git a/tests/test_case_endpoint.py b/tests/test_case_endpoint.py index 9685db6..6b64c8b 100644 --- a/tests/test_case_endpoint.py +++ b/tests/test_case_endpoint.py @@ -267,19 +267,6 @@ def test_share_and_remove_share(self, thehive: TheHiveApi, test_case: OutputCase thehive.case.remove_share(share_id=shares[0]["_id"]) assert len(thehive.case.list_shares(case_id=test_case["_id"])) == 0 - @pytest.mark.skip(reason="patch endpoint errors out") - def test_update_share(self, thehive: TheHiveApi, test_case: OutputCase): - organisation = "share-org" - share: InputShare = {"organisation": organisation, "profile": "read-only"} - - created_share = thehive.case.share(case_id=test_case["_id"], shares=[share])[0] - - update_profile = "read-only" - thehive.case.update_share(share_id=created_share["_id"], profile=update_profile) - - updated_share = thehive.case.share(case_id=test_case["_id"], shares=[share])[0] - assert updated_share["profileName"] == update_profile - @pytest.mark.skip(reason="integrator container only supports a single org ") def test_share_and_set_share(self, thehive: TheHiveApi, test_case: OutputCase): organisation = "share-org" diff --git a/thehive4py/endpoints/case.py b/thehive4py/endpoints/case.py index 1076f23..6dce59e 100644 --- a/thehive4py/endpoints/case.py +++ b/thehive4py/endpoints/case.py @@ -367,11 +367,6 @@ def remove_share(self, share_id: str) -> None: "DELETE", path=f"/api/v1/case/share/{share_id}" ) - def update_share(self, share_id: str, profile: str) -> None: - return self._session.make_request( - "PATCH", path=f"/api/v1/case/share/{share_id}", json={"profile": profile} - ) - def find( self, filters: Optional[FilterExpr] = None,