Skip to content

Commit e3580e4

Browse files
committed
linting test file
1 parent 7c3a213 commit e3580e4

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

tests/unit/pipeline/extractors/stores/test_splunk_extractor.py

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,18 +137,14 @@ def test_splunk_extractor_normalized_query_adds_search_prefix():
137137
base_url="https://splunk.example.com:8089",
138138
query="index=main | head 10",
139139
)
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"))
143141

144142

145143
def test_splunk_extractor_endpoint_urls(splunk_extractor):
146144
jobs_endpoint = splunk_extractor.get_jobs_endpoint()
147145
assert_that(
148146
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"),
152148
)
153149

154150
results_endpoint = splunk_extractor.get_results_endpoint("test123")
@@ -161,7 +157,9 @@ def test_splunk_extractor_endpoint_urls(splunk_extractor):
161157

162158

163159
@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+
):
165163
"""Test job creation with JSON response (preferred format)."""
166164
mock_response = mocker.MagicMock()
167165
mock_response.status_code = 201
@@ -198,7 +196,9 @@ async def test_splunk_extractor_create_search_job_xml_fallback(
198196

199197

200198
@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+
):
202202
"""Test job creation with malformed XML response."""
203203
mock_response = mocker.MagicMock()
204204
mock_response.status_code = 201
@@ -213,7 +213,9 @@ async def test_splunk_extractor_create_search_job_malformed_xml(splunk_extractor
213213

214214

215215
@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+
):
217219
"""Test job status checking with JSON response (expected format)."""
218220
mock_response_running = mocker.MagicMock()
219221
mock_response_running.status_code = 200
@@ -228,9 +230,7 @@ async def test_splunk_extractor_wait_for_job_completion_json_response(splunk_ext
228230
}
229231

230232
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])
234234

235235
await splunk_extractor._wait_for_job_completion(
236236
mock_client, "test123", max_wait_seconds=10
@@ -242,7 +242,9 @@ async def test_splunk_extractor_wait_for_job_completion_json_response(splunk_ext
242242

243243

244244
@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+
):
246248
"""Test job status checking with XML response (fallback)."""
247249
xml_response = """<?xml version="1.0" encoding="UTF-8"?>
248250
<response>
@@ -268,7 +270,9 @@ async def test_splunk_extractor_wait_for_job_completion_xml_fallback(splunk_extr
268270

269271

270272
@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+
):
272276
mock_response = mocker.MagicMock()
273277
mock_response.status_code = 200
274278
mock_response.json.return_value = {
@@ -312,7 +316,9 @@ async def test_splunk_extractor_get_job_results_single_chunk(
312316

313317

314318
@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+
):
316322
"""Test results retrieval when JSON parsing fails."""
317323
mock_response = mocker.MagicMock()
318324
mock_response.status_code = 200

0 commit comments

Comments
 (0)