Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

test_events: Normalize copies of the states in match_states.

Evy Kassirer74ce8b55e609
diff --git a/zerver/tests/test_events.py b/zerver/tests/test_events.py
index 398464fc529..4ca8a3a60c1 100644
--- a/zerver/tests/test_events.py
+++ b/zerver/tests/test_events.py
@@ -543,6 +543,10 @@ class BaseAction(ZulipTestCase):
# Fix the value just like server_timestamp.
state["presence_last_update_id"] = 0
+ # The states share dicts with the events, which the caller
+ # still checks against their schemas, so normalize copies.
+ state1 = copy.deepcopy(state1)
+ state2 = copy.deepcopy(state2)
normalize(state1)
normalize(state2)