From 38c8a963728290703cb93bb26135393290563f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane?= Date: Fri, 7 Jun 2024 16:18:01 +0200 Subject: [PATCH] =?UTF-8?q?test:=20am=C3=A9lioration=20de=20la=20couvertur?= =?UTF-8?q?e=20du=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- impact/metabase/tests.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/impact/metabase/tests.py b/impact/metabase/tests.py index 7653028ce..08b54ae14 100644 --- a/impact/metabase/tests.py +++ b/impact/metabase/tests.py @@ -304,6 +304,17 @@ def test_synchronise_une_entreprise_avec_un_utilisateur( assert metabase_habilitation.fonctions == "Présidente" assert not metabase_habilitation.confirmee_le + date_confirmation = datetime.now() + habilitation.confirmed_at = date_confirmation + habilitation.save() + + Command().handle() + + assert MetabaseHabilitation.objects.count() == 1 + metabase_habilitation = MetabaseHabilitation.objects.first() + + assert metabase_habilitation.confirmee_le.date() == date_confirmation.date() + @pytest.mark.django_db(transaction=True, databases=["default", METABASE_DATABASE_NAME]) def test_synchronise_les_reglementations_BDESE(