AOSSIE-Org / AOSSIE-Org/PictoPy

Add unit test coverage for system health and core server endpoints

未關閉
#1,011 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
283
分支
679
平均合併
7 天 2 小時
30 天內合併 PR
3

描述

## Description
While exploring the backend codebase, I noticed that the `/health` endpoint (and other core system routes) lacks dedicated unit test coverage in the current `pytest` suite.

To ensure the stability of the server during the upcoming 2026 project revamp, I propose adding a new test suite specifically for these system-level endpoints.

## Proposed Changes
- Create `backend/tests/test_main.py` (or update existing system tests).
- Implement `TestGeneralAPI` class using the project's standard `pytest` class-based structure.
- Add `test_health_success` to verify status codes and response integrity.
- Ensure compatibility with existing fixtures (Mocking `app.state`).

## Tech Stack
- FastAPI `TestClient`
- Pytest

## I have:
- [x] Read the Code of Conduct.
- [x] Verified the test passes locally using `python -m pytest`.
- [x] Followed the existing coding style and import patterns.

I have the code ready for a PR. May I proceed with the submission?

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。