mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
zerver/tests/tests.py: Fix non-deterministic failure.
Replace occurences of list(d.keys()) by sorted(d.keys()).
This commit is contained in:
committed by
Tim Abbott
parent
1f3ce7cf38
commit
801bcdd956
@@ -1253,7 +1253,7 @@ class UserPresenceTests(AuthedTestCase):
|
|||||||
json = ujson.loads(result.content)
|
json = ujson.loads(result.content)
|
||||||
self.assertEqual(json['presences'][email][client]['status'], 'idle')
|
self.assertEqual(json['presences'][email][client]['status'], 'idle')
|
||||||
self.assertEqual(json['presences']['hamlet@zulip.com'][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']
|
newer_timestamp = json['presences'][email][client]['timestamp']
|
||||||
self.assertGreaterEqual(newer_timestamp, timestamp)
|
self.assertGreaterEqual(newer_timestamp, timestamp)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user