From 116f982aab4b46255d632d6c5932211d975434d0 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Wed, 8 Apr 2026 17:17:39 +0200 Subject: [PATCH] fix: webhook can fail for multiple reasons (#3921) --- tests/unit/test_pay_invoice.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_pay_invoice.py b/tests/unit/test_pay_invoice.py index e8ad7ce9a..8a5b77d0d 100644 --- a/tests/unit/test_pay_invoice.py +++ b/tests/unit/test_pay_invoice.py @@ -252,7 +252,12 @@ async def test_notification_for_internal_payment( assert _payment.bolt11 == payment.bolt11 assert _payment.amount == 123_000 updated_payment = await get_payment(_payment.checking_id) - assert updated_payment.webhook_status == "404" + assert ( + updated_payment.webhook_status is not None + ), "Webhook should have been called." + assert ( + int(updated_payment.webhook_status) >= 400 + ), "Webhook should have been called and failed." @pytest.mark.anyio