Skip to content

Commit

Permalink
Cybereason driver query return instance name in dataframe (#804)
Browse files Browse the repository at this point in the history
* Add max retry parameter to the execution

* Add tests and raise exception after max retry

* doc and keyword params

* return cybereason instance name in dataframe

---------

Co-authored-by: Meroujan.Antonyan <[email protected]>
Co-authored-by: Ian Hellen <[email protected]>
  • Loading branch information
3 people authored Nov 23, 2024
1 parent 6db4cc3 commit eacda5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion msticpy/data/drivers/cybereason_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def query(
)
else:
df_result = self._format_result_to_dataframe(result=response)

df_result["instance"] = self.instance
return df_result

def _exec_paginated_queries(
Expand Down
1 change: 1 addition & 0 deletions tests/data/drivers/test_cybereason_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ def test_query(driver):
check.is_true(connect.called or driver.connected)
check.is_true(query.called)
check.is_instance(data, pd.DataFrame)
check.is_true("instance" in data.columns)

@respx.mock
def test_partial_success_query(driver):
Expand Down

0 comments on commit eacda5c

Please sign in to comment.