feat: technical, news, and social analysis agents
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
19
tests/test_social_agent.py
Normal file
19
tests/test_social_agent.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import pytest
|
||||
from agents.social import SocialAgent
|
||||
|
||||
def test_score_bullish_social():
|
||||
agent = SocialAgent()
|
||||
sentiment = {"positive": 8, "negative": 1, "neutral": 1, "total": 10}
|
||||
score = agent.analyze(sentiment, mention_trend=2.5)
|
||||
assert score >= 70
|
||||
|
||||
def test_score_bearish_social():
|
||||
agent = SocialAgent()
|
||||
sentiment = {"positive": 1, "negative": 8, "neutral": 1, "total": 10}
|
||||
score = agent.analyze(sentiment, mention_trend=0.5)
|
||||
assert score <= 35
|
||||
|
||||
def test_no_data_returns_50():
|
||||
agent = SocialAgent()
|
||||
score = agent.analyze({"positive": 0, "negative": 0, "neutral": 0, "total": 0}, 1.0)
|
||||
assert score == 50
|
||||
Reference in New Issue
Block a user