feat(ai_news): telegram includes article mapping stats line
This commit is contained in:
@@ -53,3 +53,27 @@ def test_build_message_empty_lists():
|
||||
# 빈 리스트라도 헤더는 있어야 함
|
||||
assert "호재 Top" in msg
|
||||
assert "악재 Top" in msg
|
||||
|
||||
|
||||
def test_build_message_includes_mapping_line():
|
||||
msg = tg.build_message(
|
||||
asof="2026-05-14",
|
||||
top_pos=[_row("005930", 8.5, "HBM 호재")],
|
||||
top_neg=[],
|
||||
tokens_input=1000, tokens_output=200,
|
||||
mapping={"total_articles": 35, "matched_pairs": 50, "hit_tickers": 42},
|
||||
)
|
||||
assert "매핑" in msg
|
||||
assert "42" in msg
|
||||
assert "50" in msg
|
||||
assert "35" in msg
|
||||
|
||||
|
||||
def test_build_message_without_mapping_omits_line():
|
||||
msg = tg.build_message(
|
||||
asof="2026-05-14",
|
||||
top_pos=[],
|
||||
top_neg=[],
|
||||
tokens_input=1000, tokens_output=200,
|
||||
)
|
||||
assert "매핑" not in msg
|
||||
|
||||
Reference in New Issue
Block a user