Skip to content

test_model_init.py uses extensive mocking with patch and Mock #48

@jeremymanning

Description

@jeremymanning

File: tests/test_model_init.py

Issues Found:

  • Uses patch, MagicMock, Mock throughout (lines 8, 317-635)
  • Mocks model config loader instead of using real file I/O
  • Mocks Ollama installation check
  • Mocks OpenAI/Anthropic model registration
  • Tests config loading with mocked YAML files instead of real files
  • Mocks model initialization instead of testing real model loading

Required Changes:

  • Use real file I/O for config loading tests
  • Test real model registration with actual API keys
  • Use real Ollama installation detection
  • Test actual model initialization flow
  • Remove all mocks and patches

Priority: High

This tests core model initialization and should use real components.

Part of #36

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions