mirror of https://github.com/zulip/zulip.git
zerver/tests/tests.py: Fix non-deterministic failure.
Replace occurences of list(d.keys()) by sorted(d.keys()).
This commit is contained in:
parent
1f3ce7cf38
commit
801bcdd956
|
@ -1253,7 +1253,7 @@ class UserPresenceTests(AuthedTestCase):
|
|||
json = ujson.loads(result.content)
|
||||
self.assertEqual(json['presences'][email][client]['status'], 'idle')
|
||||
self.assertEqual(json['presences']['hamlet@zulip.com'][client]['status'], 'idle')
|
||||
self.assertEqual(list(json['presences'].keys()), ['hamlet@zulip.com', 'othello@zulip.com'])
|
||||
self.assertEqual(sorted(json['presences'].keys()), ['hamlet@zulip.com', 'othello@zulip.com'])
|
||||
newer_timestamp = json['presences'][email][client]['timestamp']
|
||||
self.assertGreaterEqual(newer_timestamp, timestamp)
|
||||
|
||||
|
|
Loading…
Reference in New Issue