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

added case.set_share #242

Merged
merged 3 commits into from
Apr 8, 2022
Merged

added case.set_share #242

merged 3 commits into from
Apr 8, 2022

Conversation

lamachin3
Copy link
Contributor

add set_share to case endpoint

@To-om To-om requested a review from nadouani April 1, 2022 14:32
@Kamforka Kamforka self-requested a review April 6, 2022 07:31
Copy link
Collaborator

@Kamforka Kamforka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please also add this test to the case endpoint tests:

    def test_share_and_set_share(self, thehive: TheHiveApi, test_case: OutputCase):
        organisation = "share-org"
        share: InputShare = {"organisation": organisation}

        shares = thehive.case.share(case_id=test_case["_id"], shares=[share])
        assert len(thehive.case.list_shares(case_id=test_case["_id"])) == len(shares)

        set_shares = thehive.case.set_share(case_id=test_case["_id"], shares=[])
        assert len(thehive.case.list_shares(case_id=test_case["_id"])) == len(set_shares)

Otherwise looks good!

@Kamforka Kamforka merged commit 1483b0a into TheHive-Project:develop Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants