mirror of https://github.com/zulip/zulip.git
test_events: Sort subscribers list.
The subscribers list is appended to in `peer_add` events with not regard for preserving the ordering, and ordering isn't really important here, so it seems best to just sort it in these checks.
This commit is contained in:
parent
1cbd39b768
commit
a32167d921
|
@ -258,6 +258,8 @@ class EventsRegisterTest(AuthedTestCase):
|
|||
def normalize(state):
|
||||
# type: (Dict[str, Any]) -> None
|
||||
state['realm_users'] = {u['email']: u for u in state['realm_users']}
|
||||
for u in state['subscriptions']:
|
||||
u['subscribers'].sort()
|
||||
state['subscriptions'] = {u['name']: u for u in state['subscriptions']}
|
||||
state['unsubscribed'] = {u['name']: u for u in state['unsubscribed']}
|
||||
if 'realm_bots' in state:
|
||||
|
|
Loading…
Reference in New Issue