Skip to content

Add API response contract tests - #60

Merged
Alajmah merged 2 commits into
mainfrom
api47-contract-tests
Jun 7, 2026
Merged

Alajmah merged 2 commits into
mainfrom
api47-contract-tests

Conversation

@Alajmah

@Alajmah Alajmah commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds focused HTTP contract tests for the local FastAPI app.

Changes

  • Exercises /health through TestClient.
  • Exercises /commands through TestClient with a JSON request body.
  • Asserts the stable response shape for a read-only project summary command.

Closes #47.

Validation

  • Test-only change.
  • CI should run on this PR.

@gitwire-hq gitwire-hq Bot added the size/S label Jun 6, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e79e2539d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -0,0 +1,45 @@
from fastapi.testclient import TestClient

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Declare httpx before importing TestClient

In a clean CI environment, this import fails during test collection because Starlette's TestClient requires the optional httpx package. The workflow in .github/workflows/ci.yml installs only the package and pytest, while pyproject.toml does not declare httpx, so this commit makes the test job consistently fail with ModuleNotFoundError: No module named 'httpx'; add it to the project's test dependencies and install those dependencies in CI.

Useful? React with 👍 / 👎.

@Alajmah
Alajmah merged commit a422fbb into main Jun 7, 2026
1 check passed
@Alajmah
Alajmah deleted the api47-contract-tests branch June 7, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add API response contract tests

1 participant