Skip to content

fix(tests): enable API resource tests with respx mocking#43

Open
mattcarrollcode wants to merge 1 commit intometa-llama:mainfrom
mattcarrollcode:fix/enable-api-resource-tests
Open

fix(tests): enable API resource tests with respx mocking#43
mattcarrollcode wants to merge 1 commit intometa-llama:mainfrom
mattcarrollcode:fix/enable-api-resource-tests

Conversation

@mattcarrollcode
Copy link
Copy Markdown

Summary

  • Removes all @pytest.mark.skip(reason="Prism tests are disabled") decorators from 4 API resource test files
  • Adds respx-based HTTP mocking so tests run without a Prism mock server
  • Covers all 4 API endpoints: chat completions, models, moderations, uploads
  • Goes from 0 to 135 passing API resource tests

Test plan

  • pytest tests/api_resources/ — 135 passed, 30 skipped (aiohttp+respx incompatibility, expected)
  • Full test suite: 528 passed, 0 failed

All API resource tests were unconditionally skipped with
@pytest.mark.skip(reason="Prism tests are disabled"). This meant
zero test coverage for the actual API endpoints.

Replace the skips with respx-based HTTP mocking so these tests
run in CI without requiring a Prism mock server. Adds 135 passing
tests for chat completions, models, moderations, and uploads.
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant