@@ -93,7 +93,9 @@ def test_get_supported_date_returns_unknown_when_version_not_found():
9393
9494
9595def test_get_supported_date_returns_unknown_on_http_error ():
96- with patch ("splunk_matrix_update.requests.get" , return_value = _mock_response ("" , 500 )):
96+ with patch (
97+ "splunk_matrix_update.requests.get" , return_value = _mock_response ("" , 500 )
98+ ):
9799 assert get_supported_date ("10.4" ) == "UNKNOWN"
98100
99101
@@ -171,18 +173,14 @@ def test_remove_expired_versions_removes_past_eol():
171173
172174
173175def test_remove_expired_versions_keeps_unknown ():
174- config = make_config (
175- "[10.2]\n VERSION = 10.2.2\n SUPPORTED = UNKNOWN\n "
176- )
176+ config = make_config ("[10.2]\n VERSION = 10.2.2\n SUPPORTED = UNKNOWN\n " )
177177 result = remove_expired_versions (config )
178178 assert result is False
179179 assert config .has_section ("10.2" )
180180
181181
182182def test_remove_expired_versions_returns_false_when_nothing_removed ():
183- config = make_config (
184- "[10.2]\n VERSION = 10.2.2\n SUPPORTED = 2028-01-15\n "
185- )
183+ config = make_config ("[10.2]\n VERSION = 10.2.2\n SUPPORTED = 2028-01-15\n " )
186184 result = remove_expired_versions (config )
187185 assert result is False
188186 assert config .has_section ("10.2" )
@@ -211,7 +209,9 @@ def test_update_general_section_returns_false_when_unchanged():
211209 assert result is False
212210
213211
214- def test_update_splunk_version_adds_new_minor_and_updates_general (tmp_path , monkeypatch ):
212+ def test_update_splunk_version_adds_new_minor_and_updates_general (
213+ tmp_path , monkeypatch
214+ ):
215215 # Arrange: config with only 9.3, Docker Hub has 9.3.x and 10.4.x
216216 conf_path = tmp_path / "splunk_matrix.conf"
217217 conf_path .write_text (
@@ -231,8 +231,9 @@ def test_update_splunk_version_adds_new_minor_and_updates_general(tmp_path, monk
231231 {"name" : "aabbccddee11" , "images" : [{"digest" : "sha256-9311" }]},
232232 ]
233233
234- with patch ("splunk_matrix_update.get_images_details" , return_value = docker_images ), \
235- patch ("splunk_matrix_update.get_supported_date" , return_value = "2028-06-15" ):
234+ with patch (
235+ "splunk_matrix_update.get_images_details" , return_value = docker_images
236+ ), patch ("splunk_matrix_update.get_supported_date" , return_value = "2028-06-15" ):
236237 result = update_splunk_version ()
237238
238239 assert result == "True"
0 commit comments