Skip to content

chore: Improve test coverage to 80% #27

Description

@laurigates

Summary

Current test coverage is approximately 40%. The target should be 80% for robust test coverage.

Current Coverage Report

Module Coverage
admin.py 66%
models.py 51%
rest.py 0%
views.py 0%
Total ~40%

Areas Needing Coverage

High Priority

  • application_evaluator/rest.py - All REST API endpoints need tests
  • application_evaluator/views.py - Health check and other views

Medium Priority

  • application_evaluator/models.py - Clone methods, CSV import, attachment handling
  • application_evaluator/admin.py - Admin actions (duplicate, import, etc.)

Acceptance Criteria

  • Add tests for all REST API endpoints
  • Add tests for model methods (clone, import, scoring)
  • Add tests for admin actions
  • Achieve 80% overall coverage
  • Update pyproject.toml threshold from 40% to 80%

Notes

  • Tests currently require PostgreSQL database
  • Consider adding SQLite support for faster unit tests
  • May need fixtures for complex test scenarios

Related to #24

Metadata

Metadata

Assignees

Labels

testingTest improvements

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions