[test] makes fti test order-agnostic (closes #3005633) stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Thu, 11 Jul 2013 18:43:29 +0200
branchstable
changeset 9160 7db0c75acf1c
parent 9159 7a6ea3468765
child 9161 7b51daf84a66
[test] makes fti test order-agnostic (closes #3005633)
test/unittest_entity.py
--- a/test/unittest_entity.py	Thu Jul 11 17:16:49 2013 +0200
+++ b/test/unittest_entity.py	Thu Jul 11 18:43:29 2013 +0200
@@ -643,8 +643,10 @@
         e.cw_attr_cache['data_format'] = 'text/html'
         e.cw_attr_cache['data_encoding'] = 'ascii'
         e._cw.transaction_data = {} # XXX req should be a session
-        self.assertEqual(e.cw_adapt_to('IFTIndexable').get_words(),
-                          {'C': ['an', 'html', 'file', 'du', 'html', 'some', 'data']})
+        words = e.cw_adapt_to('IFTIndexable').get_words()
+        words['C'].sort()
+        self.assertEqual({'C': sorted(['an', 'html', 'file', 'du', 'html', 'some', 'data'])},
+                         words)
 
 
     def test_nonregr_relation_cache(self):