Skip to content

Commit

Permalink
refactor: move assertion to fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
athith-g committed Jul 25, 2024
1 parent 3792d50 commit b97f02b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/tasks/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def fixture_task(request):
@timeout(time_limit=60)
def fixture_final_task_info(task):
"""Returns task information after completion."""
assert task.status_code == 200
task_id = json.loads(task.text)["id"]
task_info = None
for _ in range(30):
Expand All @@ -58,9 +59,8 @@ def fixture_final_task_info(task):
(uppercase_task_with_decryption_body, "hello-upper-decrypt.txt", INPUT_TEXT.upper())
], indirect=["task"])
@timeout(time_limit=10)
def test_task(task, final_task_info, filename, expected_output):
def test_task(task, final_task_info, filename, expected_output): # pylint: disable=unused-argument
"""Test tasks for successful completion and intended behavior."""
assert task.status_code == 200
assert final_task_info["state"] == "COMPLETE"

wait_for_file_download(filename)
Expand Down

0 comments on commit b97f02b

Please sign in to comment.