Skip to content

Commit

Permalink
(BSR)[API] fix: potentially flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
ogeber-pass committed Jan 21, 2025
1 parent 0f769bd commit 7e5f441
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions api/tests/core/offers/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -2692,11 +2692,17 @@ def test_get_inactive_headline_offers_should_not_return_already_deactivated_head
offer=another_inactive_offer, timespan=timespan_finishing_in_the_future, create_mediation=True
)

headline_offer_query_result = repository.get_inactive_headline_offers()
assert headline_offer_query_result == [
inactive_offer_headline_offer,
headline_offer_finishing_in_the_future_but_offer_is_inactive,
]
headline_offer_query_result = sorted(
repository.get_inactive_headline_offers(), key=lambda headline_offer: headline_offer.id
)

assert headline_offer_query_result == sorted(
[
inactive_offer_headline_offer,
headline_offer_finishing_in_the_future_but_offer_is_inactive,
],
key=lambda headline_offer: headline_offer.id,
)

def test_get_inactive_headline_offers_without_images(self):
offer = factories.OfferFactory(isActive=True)
Expand Down

0 comments on commit 7e5f441

Please sign in to comment.