import pytest from app.agents.intent_classifier import IntentClassifier, Intent @pytest.mark.asyncio async def test_classify_chat(): classifier = IntentClassifier() intent = await classifier.classify("今天天气真好") assert intent == Intent.CHAT @pytest.mark.asyncio async def test_classify_analysis(): classifier = IntentClassifier() intent = await classifier.classify("帮我看看小明的健康报告") assert intent == Intent.ANALYSIS @pytest.mark.asyncio async def test_classify_recommend(): classifier = IntentClassifier() intent = await classifier.classify("推荐一些补钙的食物") assert intent == Intent.RECOMMEND @pytest.mark.asyncio async def test_classify_mind(): classifier = IntentClassifier() intent = await classifier.classify("孩子最近心情不好") assert intent == Intent.MIND @pytest.mark.asyncio async def test_classify_health(): classifier = IntentClassifier() intent = await classifier.classify("看看我的舌苔") assert intent == Intent.HEALTH