flashcard-studio / tests /conftest.py
Nathan Slaughter
refactor
8428312
raw
history blame contribute delete
378 Bytes
import pytest
from unittest.mock import Mock
from app.pipeline import Pipeline
@pytest.fixture
def pipeline():
"""
Fixture to provide a mocked LanguageModel instance.
"""
# Create a mock instance of LanguageModel
lm = Mock(spec=Pipeline)
# Mock the generate_flashcards method
lm.generate_flashcards.return_value = '{"flashcards": []}'
return lm