Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
test_message_fetch: Fix a flaky test due to random message populated.
Prakhar Pratyushfd335c06ebc6
diff --git a/zerver/tests/test_message_fetch.py b/zerver/tests/test_message_fetch.pyindex 64450c66607..bd17fcacd7b 100644--- a/zerver/tests/test_message_fetch.py+++ b/zerver/tests/test_message_fetch.py@@ -3166,7 +3166,7 @@ class GetOldMessagesTest(ZulipTestCase):narrow = [dict(operator="is", operand="resolved")]result = self.get_and_check_messages(- dict(narrow=orjson.dumps(narrow).decode(), anchor=anchor, num_before=1, num_after=1)+ dict(narrow=orjson.dumps(narrow).decode(), anchor=anchor, num_before=0, num_after=0))self.assert_length(result["messages"], 1)self.assertEqual(result["messages"][0]["id"], anchor)