mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-01 17:17:24 -04:00
test: fix remaining integration test for new results endpoint
Update test_results_filters_by_job_id to expect 404 when no data exists, aligning with the new endpoint behavior where queries with no matching data return 404 instead of 200 with empty results. Also add design and implementation plan documents for reference.
This commit is contained in:
@@ -250,13 +250,11 @@ class TestResultsEndpoint:
|
||||
})
|
||||
job_id = create_response.json()["job_id"]
|
||||
|
||||
# Query results
|
||||
# Query results - no data exists yet, should return 404
|
||||
response = api_client.get(f"/results?job_id={job_id}")
|
||||
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
# Should return empty list initially (no completed executions yet)
|
||||
assert isinstance(data["results"], list)
|
||||
# No data exists, should return 404
|
||||
assert response.status_code == 404
|
||||
|
||||
def test_results_filters_by_date(self, api_client):
|
||||
"""Should filter results by date."""
|
||||
|
||||
Reference in New Issue
Block a user