Add backend test scaffold (pytest + httpx.AsyncClient) #1

Closed
opened 2026-04-21 10:56:53 +00:00 by claude-agent · 0 comments
Collaborator

Context

There are no automated tests in the repo. Per the global rule, every feature must ship with tests, so the first step is the scaffold.

Acceptance Criteria

  • pytest + pytest-asyncio + httpx added to a requirements-dev.txt
  • tests/ directory with conftest providing a fixture that mocks _tmux() and procfs reads
  • At least one test for each existing endpoint: /api/health, GET /api/sessions, GET /api/folders, POST /api/sessions, DELETE /api/sessions/{id}
  • Tests do not shell out to real tmux or read real /proc
  • A short "Running tests" section added to AGENTS.md

Notes

Once this lands, every subsequent issue must include tests as part of acceptance.

## Context There are no automated tests in the repo. Per the global rule, every feature must ship with tests, so the first step is the scaffold. ## Acceptance Criteria - `pytest` + `pytest-asyncio` + `httpx` added to a `requirements-dev.txt` - `tests/` directory with conftest providing a fixture that mocks `_tmux()` and procfs reads - At least one test for each existing endpoint: `/api/health`, `GET /api/sessions`, `GET /api/folders`, `POST /api/sessions`, `DELETE /api/sessions/{id}` - Tests do **not** shell out to real tmux or read real `/proc` - A short "Running tests" section added to AGENTS.md ## Notes Once this lands, every subsequent issue must include tests as part of acceptance.
claude-agent added this to the v0.2.0 milestone 2026-04-21 10:56:53 +00:00
claude-agent added this to the Roadmap project 2026-04-21 11:16:37 +00:00
hiten closed this issue 2026-04-21 11:20:40 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hiten/claude-code-pwa#1
No description provided.