Skip to content

fix: resolve V1 test compatibility (Issue #2)#22

Merged
DeepRatAI merged 4 commits intomainfrom
fix/test-import-compat
Feb 26, 2026
Merged

fix: resolve V1 test compatibility (Issue #2)#22
DeepRatAI merged 4 commits intomainfrom
fix/test-import-compat

Conversation

@DeepRatAI
Copy link
Owner

Fix V1 test compatibility

Closes #2

Problem

Three test files used V1-style imports that have been broken since the V2 architecture migration:

File V1 Import Status
test_api.py from api.auth import ... ModuleNotFoundErrorapi/ directory removed
test_i18n.py from i18n import ... ModuleNotFoundError — no i18n module exists
test_medex_logger.py from medex_logger import ... 39/39 pass — root medex_logger.py works

Engineering Decisions

test_api.py → Deleted

  • The V1 api/ module (auth, main, models, services) no longer exists
  • V2 API uses factory pattern, different middleware, different models
  • test_api_v2.py (52 tests, 867 lines) fully covers the V2 API
  • Cannot be fixed with import rewrites — the entire API surface changed

test_i18n.py → Deleted

test_medex_logger.py → Promoted to required tests

  • Already passes 39/39 tests locally and in CI
  • Root medex_logger.py is mature, working code with only stdlib deps
  • Moved from "Legacy Tests" (informational) to required test matrix

CI Changes

  • Required tests: Added test_medex_logger.py (39 tests, 0 deps)
  • Legacy Tests job: Removed (no legacy test files remain)
  • Extended Tests: Cleaned up ignore list (removed deleted files)
  • Total required tests: 136 (97 existing + 39 logger tests)
  • CI jobs reduced from 8 → 7 (legacy job removed)

Local Verification

  • pytest tests/test_api_v2.py tests/test_detection.py tests/test_differential_diagnosis.py tests/test_medex_logger.py136 passed
  • ruff check src/ tests/ → All checks passed ✅
  • black --check src/ tests/ → All files unchanged ✅

Signed: Gonzalo

The V1 api/ directory was removed during V2 migration.
test_api_v2.py (52 tests) covers the V2 API.
No i18n module exists in V2. Issue #4 will create the
multi-language module with proper tests.
- Added test_medex_logger.py to required test matrix (39/39 pass)
- Removed Legacy Tests job (no legacy test files remain)
- Cleaned up extended test ignore list
- Added test_medex_logger.py to required test matrix (39/39 pass)
- Removed Legacy Tests job (no legacy test files remain)
- Cleaned up extended test ignore list
@DeepRatAI DeepRatAI added bug Something isn't working v2-architecture labels Feb 26, 2026
@DeepRatAI DeepRatAI added this to the v0.1.1 - Patch milestone Feb 26, 2026
@DeepRatAI DeepRatAI merged commit 1216962 into main Feb 26, 2026
7 checks passed
@DeepRatAI DeepRatAI deleted the fix/test-import-compat branch February 26, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working v2-architecture

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix V1 test compatibility (test_api.py, test_i18n.py)

1 participant