Skip to content

Commit fc7c58a

Browse files
committed
Update response checks and assertions in upload tests
Replaces usage of 'response.ok' with 'response.is_success' for response validation. Refactors assertions to use single-line format with error messages as arguments for improved readability.
1 parent 51ca1a7 commit fc7c58a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/api/test_upload.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def test_file_replacement_wo_metadata(self):
184184
is_filepid=False,
185185
)
186186

187-
if not response.ok:
187+
if not response.is_success:
188188
raise Exception(response.json()["message"])
189189

190190
# Assert
@@ -223,7 +223,7 @@ def test_file_replacement_w_metadata(self):
223223
json_str=df.json(),
224224
)
225225

226-
if not response.ok:
226+
if not response.is_success:
227227
raise Exception(response.json()["message"])
228228

229229
# Retrieve file ID
@@ -252,7 +252,7 @@ def test_file_replacement_w_metadata(self):
252252
is_filepid=False,
253253
)
254254

255-
if not response.ok:
255+
if not response.is_success:
256256
raise Exception(response.json()["message"])
257257

258258
# Assert

0 commit comments

Comments
 (0)