Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Commit

Permalink
reduce randomless
Browse files Browse the repository at this point in the history
  • Loading branch information
skoudoro committed Jan 9, 2022
1 parent 4f2fdc7 commit e7b5111
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mailerlite/tests/test_campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,9 @@ def test_cancel_send_campaign(header):
if not res:
pytest.skip("No campaign found with outbox status")

campaign_idx = random.randint(0, len(res))
assert res[campaign_idx].status == 'outbox'
assert res[0].status == 'outbox'
try:
code, res_2 = campaign_obj.cancel(res[campaign_idx].id)
code, res_2 = campaign_obj.cancel(res[0].id)
except OSError:
pytest.skip("Campaign Not Found so can not be cancel")
assert code == 200
Expand Down

0 comments on commit e7b5111

Please sign in to comment.