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