@@ -169,25 +169,6 @@ def test_api_create_file_empty_purpose_string(self, tmp_path):
169169
170170 # ---- Tests for Incorrect Request Structure ----
171171
172- @pytest .mark .parametrize ("method" , ["GET" , "PUT" , "DELETE" , "PATCH" , "HEAD" , "OPTIONS" ])
173- def test_api_create_file_wrong_method (self , method ):
174- """Verify endpoint rejects incorrect HTTP methods."""
175- test_name = f"test_api_create_file_wrong_method_{ method } "
176- log_response (f"Testing method: { method } " , test_name )
177-
178- try :
179- response = requests .request (method , POST_FILE_URL , timeout = REQUEST_TIMEOUT )
180- except requests .exceptions .RequestException as e :
181- log_response (f"Request failed for method { method } : { e } " , test_name )
182- # Allow connection errors etc, but fail on unexpected successes or server errors
183- return
184-
185- log_response (f"Status Code: { response .status_code } " , test_name )
186- log_response (f"Response Body: { response .text } " , test_name )
187-
188- # Expect 405 Method Not Allowed.
189- assert_equal (response .status_code , 405 )
190- assert not is_server_error (response .status_code ), f"Server error for method { method } "
191172
192173 @pytest .mark .parametrize ("content_type" , [
193174 "application/json" ,
@@ -355,9 +336,6 @@ def test_fuzz_filename(self, filename):
355336
356337 assert not is_server_error (response .status_code ), \
357338 f"Server error ({ response .status_code } ) for filename: { filename !r} "
358- # Optional stricter check: Allow only 200 or 400 (if filename validation exists)
359- # assert response.status_code == 200 or response.status_code == 400, \
360- # f"Unexpected status {response.status_code} for filename: {filename!r}"
361339
362340 fuzzy_purposes = st .one_of (
363341 st .none (), st .booleans (), st .integers (),
0 commit comments