Skip to content

feat: comprehensive test suite for API layer#2068

Merged
dartpain merged 1 commit intoarc53:mainfrom
siiddhantt:feat/api-service-tests
Oct 17, 2025
Merged

feat: comprehensive test suite for API layer#2068
dartpain merged 1 commit intoarc53:mainfrom
siiddhantt:feat/api-service-tests

Conversation

@siiddhantt
Copy link
Member

  • What kind of change does this PR introduce?
    Testing infrastructure - Adds comprehensive test suite for API layer (api/answer and api/user modules)

  • Why was this change needed?
    The API layer had minimal test coverage, making it difficult to catch bugs and refactor safely. This PR establishes a solid testing foundation with industry-standard patterns (mongomock, centralized fixtures) to ensure code quality and maintainability.

  • Other information:

    • Test Results: 450 tests passing (100% pass rate) in ~43 seconds
    • Coverage: api/user/base.py: 98% | api/answer routes: 77% | api/answer services: 45-73%
    • Key Improvements:
      • Migrated from custom FakeMongoCollection to mongomock
      • Centralized fixtures in tests/conftest.py and tests/api/conftest.py

@vercel
Copy link

vercel bot commented Oct 15, 2025

@siiddhantt is attempting to deploy a commit to the Arc53 Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added application Application tests Tests labels Oct 15, 2025
@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.21%. Comparing base (498e2b7) to head (9830306).
⚠️ Report is 91 commits behind head on main.

Files with missing lines Patch % Lines
application/utils.py 33.33% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2068      +/-   ##
==========================================
+ Coverage   34.67%   42.21%   +7.53%     
==========================================
  Files         131      135       +4     
  Lines        8703     9303     +600     
==========================================
+ Hits         3018     3927     +909     
+ Misses       5685     5376     -309     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vercel
Copy link

vercel bot commented Oct 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
oss-docsgpt Ready Ready Preview Comment Oct 17, 2025 9:01am

@dartpain dartpain merged commit 125ce0a into arc53:main Oct 17, 2025
7 of 10 checks passed
@siiddhantt siiddhantt deleted the feat/api-service-tests branch December 3, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

application Application tests Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants