@@ -137,18 +137,14 @@ def test_splunk_extractor_normalized_query_adds_search_prefix():
137
137
base_url = "https://splunk.example.com:8089" ,
138
138
query = "index=main | head 10" ,
139
139
)
140
- assert_that (
141
- extractor2 ._normalized_query , equal_to ("search index=main | head 10" )
142
- )
140
+ assert_that (extractor2 ._normalized_query , equal_to ("search index=main | head 10" ))
143
141
144
142
145
143
def test_splunk_extractor_endpoint_urls (splunk_extractor ):
146
144
jobs_endpoint = splunk_extractor .get_jobs_endpoint ()
147
145
assert_that (
148
146
jobs_endpoint ,
149
- equal_to (
150
- "https://splunk.example.com:8089/servicesNS/admin/search/search/jobs"
151
- ),
147
+ equal_to ("https://splunk.example.com:8089/servicesNS/admin/search/search/jobs" ),
152
148
)
153
149
154
150
results_endpoint = splunk_extractor .get_results_endpoint ("test123" )
@@ -161,7 +157,9 @@ def test_splunk_extractor_endpoint_urls(splunk_extractor):
161
157
162
158
163
159
@pytest .mark .asyncio
164
- async def test_splunk_extractor_create_search_job_json_response (splunk_extractor , mocker ):
160
+ async def test_splunk_extractor_create_search_job_json_response (
161
+ splunk_extractor , mocker
162
+ ):
165
163
"""Test job creation with JSON response (preferred format)."""
166
164
mock_response = mocker .MagicMock ()
167
165
mock_response .status_code = 201
@@ -198,7 +196,9 @@ async def test_splunk_extractor_create_search_job_xml_fallback(
198
196
199
197
200
198
@pytest .mark .asyncio
201
- async def test_splunk_extractor_create_search_job_malformed_xml (splunk_extractor , mocker ):
199
+ async def test_splunk_extractor_create_search_job_malformed_xml (
200
+ splunk_extractor , mocker
201
+ ):
202
202
"""Test job creation with malformed XML response."""
203
203
mock_response = mocker .MagicMock ()
204
204
mock_response .status_code = 201
@@ -213,7 +213,9 @@ async def test_splunk_extractor_create_search_job_malformed_xml(splunk_extractor
213
213
214
214
215
215
@pytest .mark .asyncio
216
- async def test_splunk_extractor_wait_for_job_completion_json_response (splunk_extractor , mocker ):
216
+ async def test_splunk_extractor_wait_for_job_completion_json_response (
217
+ splunk_extractor , mocker
218
+ ):
217
219
"""Test job status checking with JSON response (expected format)."""
218
220
mock_response_running = mocker .MagicMock ()
219
221
mock_response_running .status_code = 200
@@ -228,9 +230,7 @@ async def test_splunk_extractor_wait_for_job_completion_json_response(splunk_ext
228
230
}
229
231
230
232
mock_client = mocker .MagicMock ()
231
- mock_client .get = AsyncMock (
232
- side_effect = [mock_response_running , mock_response_done ]
233
- )
233
+ mock_client .get = AsyncMock (side_effect = [mock_response_running , mock_response_done ])
234
234
235
235
await splunk_extractor ._wait_for_job_completion (
236
236
mock_client , "test123" , max_wait_seconds = 10
@@ -242,7 +242,9 @@ async def test_splunk_extractor_wait_for_job_completion_json_response(splunk_ext
242
242
243
243
244
244
@pytest .mark .asyncio
245
- async def test_splunk_extractor_wait_for_job_completion_xml_fallback (splunk_extractor , mocker ):
245
+ async def test_splunk_extractor_wait_for_job_completion_xml_fallback (
246
+ splunk_extractor , mocker
247
+ ):
246
248
"""Test job status checking with XML response (fallback)."""
247
249
xml_response = """<?xml version="1.0" encoding="UTF-8"?>
248
250
<response>
@@ -268,7 +270,9 @@ async def test_splunk_extractor_wait_for_job_completion_xml_fallback(splunk_extr
268
270
269
271
270
272
@pytest .mark .asyncio
271
- async def test_splunk_extractor_wait_for_job_completion_failure (splunk_extractor , mocker ):
273
+ async def test_splunk_extractor_wait_for_job_completion_failure (
274
+ splunk_extractor , mocker
275
+ ):
272
276
mock_response = mocker .MagicMock ()
273
277
mock_response .status_code = 200
274
278
mock_response .json .return_value = {
@@ -312,7 +316,9 @@ async def test_splunk_extractor_get_job_results_single_chunk(
312
316
313
317
314
318
@pytest .mark .asyncio
315
- async def test_splunk_extractor_get_job_results_json_parse_error (splunk_extractor , mocker ):
319
+ async def test_splunk_extractor_get_job_results_json_parse_error (
320
+ splunk_extractor , mocker
321
+ ):
316
322
"""Test results retrieval when JSON parsing fails."""
317
323
mock_response = mocker .MagicMock ()
318
324
mock_response .status_code = 200
0 commit comments