Skip to content

Commit

Permalink
Merge pull request #557 from colts661/remove_test_iu
Browse files Browse the repository at this point in the history
Removed extra inserted interested users in `test_perk_fulfillment_repo.py`
  • Loading branch information
cassidysymons authored Dec 18, 2023
2 parents 8d4c0bd + cc1b952 commit 2a6644a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions microsetta_private_api/repo/tests/test_perk_fulfillment_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,8 @@ def tearDown(self):
)
cur.execute(
"DELETE FROM campaign.transaction "
"WHERE id IN %s",
"WHERE id IN %s "
"RETURNING interested_user_id",
(
(
FFQ_TRANSACTION_ID,
Expand All @@ -439,10 +440,16 @@ def tearDown(self):
),
)
)
inserted_iu_ids = [tup[0] for tup in cur.fetchall()]
cur.execute(
"DELETE FROM campaign.interested_users AS iu "
"WHERE iu.interested_user_id IN %s",
(tuple(self.iu_ids), )
(
(
*inserted_iu_ids,
*self.iu_ids
),
) # self.iu_ids contains iu without transaction
)
cur.execute(
"DELETE FROM campaign.campaigns_projects "
Expand Down

0 comments on commit 2a6644a

Please sign in to comment.