feat(notify): mesaje alertă și comentarii business în română
Toate alertele Discord/Telegram traduse: armat, pregătit, recuperare, semnal, activ, niveluri, pornit/oprit. Comentariile de business-logic din main.py traduse în română. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -92,8 +92,7 @@ def test_handle_tick_prime_buy():
|
||||
assert notif.alerts[0].kind == "arm"
|
||||
assert notif.alerts[1].kind == "prime"
|
||||
assert notif.alerts[1].direction == "BUY"
|
||||
# Non-catchup prime alert must not mention catchup
|
||||
assert "catchup" not in notif.alerts[1].title.lower()
|
||||
assert "recuperare" not in notif.alerts[1].title.lower()
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -133,10 +132,10 @@ def test_handle_tick_catchup_dark_green():
|
||||
assert len(notif.alerts) == 2
|
||||
assert notif.alerts[0].kind == "arm"
|
||||
assert notif.alerts[0].direction == "BUY"
|
||||
assert "catchup" in notif.alerts[0].title.lower() or "catchup" in notif.alerts[0].body.lower()
|
||||
assert "recuperare" in notif.alerts[0].title.lower() or "recuperare" in notif.alerts[0].body.lower()
|
||||
assert notif.alerts[1].kind == "prime"
|
||||
assert notif.alerts[1].direction == "BUY"
|
||||
assert "catchup" in notif.alerts[1].title.lower() or "catchup" in notif.alerts[1].body.lower()
|
||||
assert "recuperare" in notif.alerts[1].title.lower() or "recuperare" in notif.alerts[1].body.lower()
|
||||
|
||||
# Audit: both tick entries tagged catchup:true
|
||||
catchup_events = [e for e in audit.events if e.get("catchup")]
|
||||
@@ -216,8 +215,8 @@ def test_handle_tick_first_turquoise_no_catchup_label():
|
||||
assert len(notif.alerts) == 1
|
||||
assert notif.alerts[0].kind == "arm"
|
||||
# Decision 3A: cannot distinguish fresh arm from catchup-at-arm-phase
|
||||
assert "catchup" not in notif.alerts[0].title.lower()
|
||||
assert "catchup" not in notif.alerts[0].body.lower()
|
||||
assert "recuperare" not in notif.alerts[0].title.lower()
|
||||
assert "recuperare" not in notif.alerts[0].body.lower()
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -238,7 +237,7 @@ def test_handle_tick_catchup_dark_red_when_not_first_accepted():
|
||||
assert len(notif.alerts) == 2
|
||||
assert notif.alerts[0].kind == "arm"
|
||||
assert notif.alerts[0].direction == "SELL"
|
||||
assert "catchup" in (notif.alerts[0].title + notif.alerts[0].body).lower()
|
||||
assert "recuperare" in (notif.alerts[0].title + notif.alerts[0].body).lower()
|
||||
assert notif.alerts[1].kind == "prime"
|
||||
assert notif.alerts[1].direction == "SELL"
|
||||
|
||||
@@ -341,7 +340,7 @@ def test_handle_tick_opposite_direction_catchup_after_fire():
|
||||
assert len(notif.alerts) == baseline_alerts + 2
|
||||
assert notif.alerts[baseline_alerts].kind == "arm"
|
||||
assert notif.alerts[baseline_alerts].direction == "SELL"
|
||||
assert "catchup" in (notif.alerts[baseline_alerts].title + notif.alerts[baseline_alerts].body).lower()
|
||||
assert "recuperare" in (notif.alerts[baseline_alerts].title + notif.alerts[baseline_alerts].body).lower()
|
||||
assert notif.alerts[baseline_alerts + 1].kind == "prime"
|
||||
assert notif.alerts[baseline_alerts + 1].direction == "SELL"
|
||||
|
||||
|
||||
@@ -247,11 +247,11 @@ def test_run_live_catchup_sell_from_gray_then_dark_red(monkeypatch, tmp_path):
|
||||
|
||||
assert len(arm) == 1, f"expected 1 arm alert, got {len(arm)} ({[a.title for a in captured]})"
|
||||
assert arm[0].direction == "SELL"
|
||||
assert "catchup" in (arm[0].title + arm[0].body).lower()
|
||||
assert "recuperare" in (arm[0].title + arm[0].body).lower()
|
||||
|
||||
assert len(prime) == 1
|
||||
assert prime[0].direction == "SELL"
|
||||
assert "catchup" in (prime[0].title + prime[0].body).lower()
|
||||
assert "recuperare" in (prime[0].title + prime[0].body).lower()
|
||||
|
||||
assert len(trigger) == 1
|
||||
assert trigger[0].direction == "SELL"
|
||||
|
||||
Reference in New Issue
Block a user