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