Skip to content

Commit

Permalink
Merge pull request #402 from TheHive-Project/398-remove-update_share-…
Browse files Browse the repository at this point in the history
…method-from-the-case-endpoint

#398 - Remove `update_share` method from case endpoint
  • Loading branch information
Kamforka authored Feb 25, 2025
2 parents ca36b59 + ac2050b commit b2d349b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
13 changes: 0 additions & 13 deletions tests/test_case_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 0 additions & 5 deletions thehive4py/endpoints/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b2d349b

Please sign in to comment.