Skip to content

Commit

Permalink
Add tests for change job status endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelltaylor committed Jun 19, 2024
1 parent 75181fa commit 6185377
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 382 deletions.
2 changes: 1 addition & 1 deletion florist/api/routes/server/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def change_job_status(job_id: str, status: JobStatus, request: Request) ->
"""
job_in_db = await Job.find_by_id(job_id, request.app.database)
try:
assert job_in_db is not None
assert job_in_db is not None, f"Job {job_id} not found"
await job_in_db.set_status(status, request.app.database)
return JSONResponse(content={"status": "success"})
except AssertionError as e:
Expand Down
381 changes: 0 additions & 381 deletions florist/tests/integration/api/routes/server/test_job.py

This file was deleted.

Loading

0 comments on commit 6185377

Please sign in to comment.