fix(projekt-matching): verify teamsIds/account equality in read-back; always post trace

This commit is contained in:
tlg
2026-07-09 11:12:06 +02:00
parent 1481bbc30c
commit 2f321aecc6
2 changed files with 28 additions and 12 deletions

View File

@@ -100,3 +100,10 @@ def test_stage_notify_only_on_created():
sent.clear()
stages.stage_notify({"status": "rejected"}, CFG)
assert not sent
traced = []
with mock.patch("projektmatch.stages.mailer.send_mail",
lambda *a: sent.append(a)), \
mock.patch("projektmatch.stages.pm_trace.post_trace",
lambda c: traced.append(c["status"])):
stages.stage_notify({"status": "failed", "error": "x"}, CFG)
assert traced == ["failed"] and not sent