Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#398 - Remove update_share method from case endpoint #402

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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