File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 55from unittest import mock
66
77import pytest
8- from pytest_httpserver import HTTPServer
98from pydantic import ValidationError
10-
9+ from pytest_httpserver import HTTPServer
1110
1211from _incydr_cli .cmds .options .output_options import TableFormat
1312from _incydr_cli .cursor import CursorStore
566565
567566TEST_SAVED_SEARCH_ID = "saved-search-1"
568567
569- TEST_BAD_EVENT_JSON = """{
568+ TEST_BAD_EVENT_JSON = r """{
570569 "fileEvents": [
571570 {
572571 "@timestamp": "2025-08-04T01:01:01.081Z",
@@ -811,6 +810,7 @@ def mock_list_saved_searches(httpserver_auth):
811810 "/v2/file-events/saved-searches" , method = "GET"
812811 ).respond_with_json (search_data )
813812
813+
814814@pytest .mark .parametrize (
815815 "query, expected_query" ,
816816 [(TEST_EVENT_QUERY , TEST_DICT_QUERY )],
@@ -878,6 +878,7 @@ def test_get_saved_search_returns_expected_data_when_search_has_subgroups(
878878 assert isinstance (search , SavedSearch )
879879 assert search .json () == TEST_SAVED_SEARCH_3 .json ()
880880
881+
881882def test_search_raises_exception_when_bad_event_json (httpserver_auth : HTTPServer ):
882883 httpserver_auth .expect_request ("/v2/file-events" , method = "POST" ).respond_with_data (
883884 TEST_BAD_EVENT_JSON
You can’t perform that action at this time.
0 commit comments