diff test/db_test_base.py @ 5262:b5400cae9c2a

Make sure to sort the result otherwise anydbm and sql ordering is different.
author John Rouillard <rouilj@ieee.org>
date Mon, 28 Aug 2017 22:22:01 -0400
parents 53a853c06e9a
children f015df5f8edf
line wrap: on
line diff
--- a/test/db_test_base.py	Mon Aug 28 21:51:12 2017 -0400
+++ b/test/db_test_base.py	Mon Aug 28 22:22:01 2017 -0400
@@ -1116,14 +1116,16 @@
         self.assertEqual(expected, args)
 
         result=self.db.user.history('2')
+        result.sort()
 
         # result should look like:
-        #  [('2', <Date 2017-08-29.01:42:44.283>, '1', 'link',
-        #      ('issue', '1', 'nosy')),
-        #   ('2', <Date 2017-08-29.01:42:40.227>, '1', 'create', {})]
+        #  [('2', <Date 2017-08-29.01:42:40.227>, '1', 'create', {}),
+        #   ('2', <Date 2017-08-29.01:42:44.283>, '1', 'link',
+        #      ('issue', '1', 'nosy')) ]
 
         expected2 = ('issue', '1', 'nosy')
-        (id, tx_date, user, action, args) = result[0]
+
+        (id, tx_date, user, action, args) = result[-1]
 
         self.assertEqual(len(result),2)
 

Roundup Issue Tracker: http://roundup-tracker.org/