From 8bfb459cfad56bdf8495f174a6eb131404ad4d66 Mon Sep 17 00:00:00 2001 From: Olivier LEVILLAIN Date: Sat, 4 May 2024 11:12:18 +0200 Subject: [PATCH] fixed inbox once again --- tests/test_maildropy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_maildropy.py b/tests/test_maildropy.py index 70c5b30..a938ba1 100644 --- a/tests/test_maildropy.py +++ b/tests/test_maildropy.py @@ -57,7 +57,8 @@ def getenv(): @pytest.fixture(scope="class") def inbox(getenv): - rand_id = ''.join(random.choice(string.printable) for _ in range(8)) + allowed_chars = string.ascii_lowercase + string.digits + rand_id = ''.join(random.choice(allowed_chars) for _ in range(8)) inbox_prefix = getenv['MAILDROP_INBOX_PREFIX'] return f'{inbox_prefix}-{rand_id}' @@ -112,7 +113,7 @@ def send_mails(params, getenv, inbox, maildrop_reader): sent_mails = [] for _ in range(params.nb_msgs_to_test_with): - sent_mails.append(send_test_mail(params, getenv)) + sent_mails.append(send_test_mail(params, getenv, inbox)) time.sleep(1) # rate limiting? time_to_wait = params.receive_timeout