forked from automationExamples/pytest-api-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbugs
More file actions
16 lines (12 loc) · 670 Bytes
/
bugs
File metadata and controls
16 lines (12 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Bug 1: Broken error message formatting in /pets/findByStatus
In the app, this line is wrong:
api.abort(400, 'Invalid pet status {status}')
It should be:
api.abort(400, f"Invalid pet status {status}")
Right now it returns the literal text {status} instead of the actual value.
Bug 2: PATCH assumes "status" always exists
This line:
order['status'] = update_data['status']
Will raise a server error if the client sends {}. The API should validate that field before using it.
Bug 3: No GET endpoint for order lookup
You can create and patch orders, but there is no endpoint to fetch an order by ID. That limits test coverage and makes verification indirect.