You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add automated tests and CI workflow for FastAPI backend - Method-section-generator/apps/backend/app/main.py #4
Currently, the FastAPI backend (including backend/main.py and the associated API routes) does not appear to have automated tests. This makes it difficult to verify endpoint behavior, detect regressions, and safely extend functionality in the future.
Additionally, there is no CI workflow configured to automatically run tests on pull requests.
Describe the solution you'd like
I would like to:
Add a structured tests/ directory for the backend
Use pytest together with fastapi.testclient.TestClient
Implement tests for:
The root (/) endpoint
The /api routes defined in report_router
Validate:
HTTP status codes
Response structure
Required fields in returned JSON
Add a GitHub Actions workflow to automatically run tests on pull requests
This will improve reliability, maintainability, and confidence in future changes.
Describe alternatives you've considered
An alternative would be to rely on manual testing during development. However, automated testing ensures consistent validation and allows easier extension of functionality without introducing regressions.
Additional context
This change will not modify any existing functionality or scientific logic. It will focus solely on improving backend reliability and developer experience by introducing structured automated testing and CI integration.
Before writing any code, you need to call dibs so no one else takes it. Go to Issue #4 and drop this exact comment:
"Hi @vinitjain2005 and mentors, I would love to work on this issue and set up the pytest architecture along with the GitHub Actions workflow. Could you assign it to me?
Activity
Aarshpatel12 commentedon Mar 22, 2026
Before writing any code, you need to call dibs so no one else takes it. Go to Issue #4 and drop this exact comment:
"Hi @vinitjain2005 and mentors, I would love to work on this issue and set up the pytest architecture along with the GitHub Actions workflow. Could you assign it to me?
feat: Add pytest architecture, route tests, and GitHub Actions CI wor…