From 474f43689163bdac7444f038ab21dadf169a03d8 Mon Sep 17 00:00:00 2001 From: Renato Alves Date: Wed, 23 Jun 2021 23:55:15 +0200 Subject: [PATCH] Retry fetching posts as well --- tests/integration_tests/test_direct_message_plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration_tests/test_direct_message_plugin.py b/tests/integration_tests/test_direct_message_plugin.py index 90a07dc3..27799d04 100644 --- a/tests/integration_tests/test_direct_message_plugin.py +++ b/tests/integration_tests/test_direct_message_plugin.py @@ -67,9 +67,9 @@ def bot_and_user_direct_channel(channel): else: raise ValueError("Couldn't find a direct channel between user and bot") - posts = driver.posts.get_posts_for_channel(channel["id"]) - for _ in range(retries): + posts = driver.posts.get_posts_for_channel(channel["id"]) + for post in posts["posts"].values(): if post["message"] == reply: return