# HG changeset patch # User Julien Cristau # Date 1423836751 -3600 # Node ID 55413788be1025456ac027297212eb2a01ba7e16 # Parent e42c2226c878cce28b0c61415247344d5ea442bc [web/test] don't depend on iteration order on a set Fixes test under python -R ('pending_insert' in session data is a set, so we can't rely on any particular ordering). Related to #4959402. diff -r e42c2226c878 -r 55413788be10 web/test/unittest_views_basecontrollers.py --- a/web/test/unittest_views_basecontrollers.py Fri Feb 13 15:10:43 2015 +0100 +++ b/web/test/unittest_views_basecontrollers.py Fri Feb 13 15:12:31 2015 +0100 @@ -836,9 +836,9 @@ deletes = get_pending_deletes(req) self.assertEqual(deletes, []) inserts = get_pending_inserts(req) - self.assertEqual(inserts, ['12:tags:13', '12:tags:14']) + self.assertCountEqual(inserts, ['12:tags:13', '12:tags:14']) inserts = get_pending_inserts(req, 12) - self.assertEqual(inserts, ['12:tags:13', '12:tags:14']) + self.assertCountEqual(inserts, ['12:tags:13', '12:tags:14']) inserts = get_pending_inserts(req, 13) self.assertEqual(inserts, ['12:tags:13']) inserts = get_pending_inserts(req, 14) @@ -855,9 +855,9 @@ inserts = get_pending_inserts(req) self.assertEqual(inserts, []) deletes = get_pending_deletes(req) - self.assertEqual(deletes, ['12:tags:13', '12:tags:14']) + self.assertCountEqual(deletes, ['12:tags:13', '12:tags:14']) deletes = get_pending_deletes(req, 12) - self.assertEqual(deletes, ['12:tags:13', '12:tags:14']) + self.assertCountEqual(deletes, ['12:tags:13', '12:tags:14']) deletes = get_pending_deletes(req, 13) self.assertEqual(deletes, ['12:tags:13']) deletes = get_pending_deletes(req, 14) @@ -880,7 +880,7 @@ with self.remote_calling('add_pending_inserts', [('12', 'tags', '13'), ('12', 'tags', '14')]) as (_, req): inserts = get_pending_inserts(req) - self.assertEqual(inserts, ['12:tags:13', '12:tags:14']) + self.assertCountEqual(inserts, ['12:tags:13', '12:tags:14']) req.remove_pending_operations()