Skip to content

[$30 BOUNTY] [Python] Expand backend API contract edge-case tests #1

Description

@jackjin1997

Bounty: $30 (LT)

Area: backend/api_contract.py and tests/backend_api/

Current state: The backend API contract helpers have pytest coverage for the main happy path, but edge cases around malformed payloads, async wrappers, and error response shape still need focused tests.

What is needed: Extend the backend API contract test suite with deterministic negative cases and async wrapper coverage.

Acceptance criteria:

  • Cover malformed or missing required fields returning a structured contract error.
  • Cover async helper execution without requiring optional pytest plugins unless explicitly added.
  • Cover response status/body assertions for at least two negative cases.
  • Keep fixtures isolated so tests do not depend on network services.
  • Update the test README or comments with the exact local command.

Required validation:

  • Run python3 -m pytest -q tests/backend_api or the closest focused pytest command.
  • Run python3 build.py.
  • Include the generated diagnostic/build-*.logd artifact from diagnostic/; include the matching diagnostic/build-*.json if present.
  • Use .github/pull_request_template.md for the submission.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions