Skip to content

Add fastapi, httpx, and hypothesis to test dependencies#1

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-fastapi-dependency
Draft

Add fastapi, httpx, and hypothesis to test dependencies#1
Copilot wants to merge 2 commits intomainfrom
copilot/add-fastapi-dependency

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 7, 2026

Description

tests/server_test.py and tests/server_fuzz_test.py fail with ModuleNotFoundError: No module named 'fastapi' because the packages they require were absent from the [test] extras in pyproject.toml.

Changes:

  • pyproject.toml: Add fastapi>=0.111.0, httpx>=0.27.0, and hypothesis>=6.100.0 to [project.optional-dependencies] test
    • fastapi — direct import (from fastapi.testclient import TestClient) in both server test files
    • httpx — runtime requirement of FastAPI's TestClient
    • hypothesis — property-based fuzz testing in server_fuzz_test.py

Versions align with what is already pinned in server/requirements.txt. CI installs via pip install -e ".[dev,test]", so these are now included automatically.

Bug fix

How Has This Been Tested?

$ python -m pytest tests/server_test.py tests/server_fuzz_test.py -q
61 passed in 16.23s

Checklist:

  • I have read and acknowledged Google's Open Source
    Code of conduct.
  • I have read the
    Contributing
    page, and I either signed the Google
    Individual CLA
    or am covered by my company's
    Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked
    issue(s) and we have agreed upon the general approach.
  • I have made any needed documentation changes, or noted in the linked
    issue(s) that documentation elsewhere needs updating.
  • I have added tests, or I have ensured existing tests cover the changes
  • I have followed
    Google's Python Style Guide
    and ran pylint over the affected code.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • generativelanguage.googleapis.com
    • Triggering command: /usr/bin/python python -m pytest tests/server_test.py tests/server_fuzz_test.py -x -q (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…toml

Co-authored-by: Johnaverse <110527930+Johnaverse@users.noreply.github.com>
Copilot AI changed the title [WIP] Add fastapi dependency for CI tests Add fastapi, httpx, and hypothesis to test dependencies Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants