mirror of
https://github.com/TauricResearch/TradingAgents.git
synced 2026-09-27 06:56:39 +03:00
fix(stocktwits): decode HTML entities in message bodies
- bodies reach the prompt and the screen as plain text (S&P, wasn't) rather than escaped (S&P, wasn't)
This commit is contained in:
@@ -114,3 +114,10 @@ class TestStockTwitsScreening:
|
||||
with patch.object(stocktwits, "urlopen", return_value=_stream("SPAM")):
|
||||
out = stocktwits.fetch_stocktwits_messages("NVDA", screen=_drop_spam)
|
||||
assert "none of the 1 StockTwits messages is about $NVDA" in out
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_html_entities_in_message_bodies_are_decoded():
|
||||
with patch.object(stocktwits, "urlopen", return_value=_stream("S&P wasn't up")):
|
||||
out = stocktwits.fetch_stocktwits_messages("NVDA")
|
||||
assert "S&P wasn't up" in out
|
||||
|
||||
Reference in New Issue
Block a user