Skip to content

[FEATURE] Add API contract tests for core endpoints #11

@EQuBitC18

Description

@EQuBitC18

Feature Summary

Add API contract tests for core endpoints to prevent response-shape and validation regressions.

Problem/Use Case

Current backend tests cover only part of the API and mostly happy paths. Small response or validation changes can slip into production without being detected.

Proposed Solution

Add contract-style tests that validate both successful and failure responses for core API endpoints, while mocking external LLM dependencies for deterministic CI behavior.

Alternative Solutions

No response

Priority

Would be helpful

Feature Scope

Backend (API/Server)

Additional Context

Suggested coverage targets:

GET /api/microcourses/
GET /api/microcourses//
POST /api/add_microcourse/
POST /api/generate_next_section/
POST /api/agent_response/
glossary/note mutation endpoints

Checklist

  • This feature would benefit other users, not just me
  • I have searched for similar feature requests
  • I am willing to help implement this feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions