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

Commit

Permalink
add attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
skoudoro committed Jan 25, 2022
1 parent b0f8f0d commit a088a2c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions mailerlite/tests/test_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import random
import string
import time
import itertools

import pytest

Expand Down Expand Up @@ -103,7 +104,8 @@ def test_groups_subscriber(header):

assert sub1.email == tmp_sub.email

while True:
attempt = itertools.count()
while True and next(attempt) < 15:
try:
num = random.randint(1000, 100000)
mail = generate_random_email(length=15, seed=num)
Expand Down Expand Up @@ -157,7 +159,8 @@ def test_groups_single_subscriber(header):

assert sub1.email == tmp_sub.email

while True:
attempt = itertools.count()
while True and next(attempt) < 20:
try:
num = random.randint(1000, 100000)
mail = generate_random_email(length=15, seed=num)
Expand Down
4 changes: 3 additions & 1 deletion mailerlite/tests/test_subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import random
import string
import time
import itertools

import pytest

Expand Down Expand Up @@ -73,7 +74,8 @@ def test_subscribers_error(header):
def test_subscribers_crud(header):
subscriber = Subscribers(header)

while True:
attempt = itertools.count()
while True and next(attempt) < 20:
try:
num = random.randint(1000, 100000)
mail = generate_random_email(length=15, seed=num)
Expand Down

0 comments on commit a088a2c

Please sign in to comment.