forked from 0xWheatyz/SPARC
Add API tests for export endpoints (/export/{company_name} and /export/{company_name}/pdf) #1655
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The export endpoints (
GET /export/{company_name}for CSV andGET /export/{company_name}/pdf) are implemented but have no test coverage intests/test_api.py. The existing API tests cover analyze, batch, and job listing but skip export entirely.What to do
Add test cases to
tests/test_api.py(or a newtests/test_export.py) covering:GET /export/{company_name}returns a valid CSV response for an existing analysisGET /export/{company_name}/pdfreturns a PDF response for an existing analysisAcceptance criteria
pytest tests/ -vruff check tests/passes with no errorsRoadmap reference
Related to the completed P3 "Export analysis reports" item in ROADMAP.md.
PR #1668 has been created for this issue. Work was completed on branch and is ready for review.