Skip to content

Commit 6b20fc8

Browse files
committed
Make sure to sort the result otherwise anydbm and sql ordering is different.
1 parent 993e6a2 commit 6b20fc8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/db_test_base.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,14 +1116,16 @@ def testQuietJournal(self):
11161116
self.assertEqual(expected, args)
11171117

11181118
result=self.db.user.history('2')
1119+
result.sort()
11191120

11201121
# result should look like:
1121-
# [('2', <Date 2017-08-29.01:42:44.283>, '1', 'link',
1122-
# ('issue', '1', 'nosy')),
1123-
# ('2', <Date 2017-08-29.01:42:40.227>, '1', 'create', {})]
1122+
# [('2', <Date 2017-08-29.01:42:40.227>, '1', 'create', {}),
1123+
# ('2', <Date 2017-08-29.01:42:44.283>, '1', 'link',
1124+
# ('issue', '1', 'nosy')) ]
11241125

11251126
expected2 = ('issue', '1', 'nosy')
1126-
(id, tx_date, user, action, args) = result[0]
1127+
1128+
(id, tx_date, user, action, args) = result[-1]
11271129

11281130
self.assertEqual(len(result),2)
11291131

0 commit comments

Comments
 (0)