From 2150ade42b51f6f9b328cfda2292cd374917a125 Mon Sep 17 00:00:00 2001 From: Colin Maudry Date: Mon, 6 Jul 2026 11:01:32 +0200 Subject: [PATCH] =?UTF-8?q?test(abonnement):=20adapter=20les=20tests=20de?= =?UTF-8?q?=20=5Freabo=5Fbutton=20=C3=A0=20sa=20nouvelle=20signature?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _reabo_button() ne prend plus has_used_trial (bouton de réabonnement simplifié) ; les deux anciens tests testant M'abonner/Me réabonner sont remplacés par un test du comportement actuel. --- tests/subscriptions/test_compte_abonnement.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/tests/subscriptions/test_compte_abonnement.py b/tests/subscriptions/test_compte_abonnement.py index 5c5df93..a033839 100644 --- a/tests/subscriptions/test_compte_abonnement.py +++ b/tests/subscriptions/test_compte_abonnement.py @@ -1,18 +1,9 @@ -def test_reabo_button_never_subscribed(): +def test_reabo_button_links_to_abonnement_page(): from src.pages.compte import abonnement as compte_abonnement - text = str(compte_abonnement._reabo_button(has_used_trial=False)) - assert "M'abonner" in text - assert "Me réabonner" not in text - assert "href='/a-propos/abonnement'" in text - - -def test_reabo_button_former_subscriber(): - from src.pages.compte import abonnement as compte_abonnement - - text = str(compte_abonnement._reabo_button(has_used_trial=True)) - assert "Me réabonner" in text - assert "href='/a-propos/abonnement'" in text + text = str(compte_abonnement._reabo_button()) + assert "Abonnez-vous" in text + assert "/a-propos/abonnement" in text def test_active_view_shows_cancel(monkeypatch):