From 5712990a0e60103cb9ce9e052f9300b10de58b44 Mon Sep 17 00:00:00 2001 From: Takahiro Mitsui Date: Fri, 20 Oct 2023 12:00:40 +0200 Subject: [PATCH] feat: Fix test_repository --- tests/unit/api/test_repository.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/unit/api/test_repository.py b/tests/unit/api/test_repository.py index 0a5af1ba..728295d9 100644 --- a/tests/unit/api/test_repository.py +++ b/tests/unit/api/test_repository.py @@ -118,8 +118,7 @@ def test_repository_can_list_all_party_donations(self, session): assert retrieved_list[0].date == date(2020, 1, 6) assert retrieved_list[-1].date == date(2020, 1, 1) # Cleanup - session.execute(text("DELETE FROM party_donation")) - session.commit() + delete_party_donation(session) # list def test_repository_can_list_all_party_donations_with_party_ids(self, session): @@ -133,5 +132,4 @@ def test_repository_can_list_all_party_donations_with_party_ids(self, session): assert retrieved_list[0].date == date(2020, 1, 4) assert retrieved_list[-1].date == date(2020, 1, 1) # Cleanup - session.execute(text("DELETE FROM party_donation")) - session.commit() + delete_party_donation(session)