mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-01 14:01:35 +00:00
Fixes nondeterministic order of query causing test failure
This commit is contained in:
parent
257a29dcfd
commit
44a0ef3b0b
1 changed files with 3 additions and 1 deletions
|
@ -27,7 +27,9 @@ class User(TestCase):
|
||||||
shelves = models.Shelf.objects.filter(user=self.user).all()
|
shelves = models.Shelf.objects.filter(user=self.user).all()
|
||||||
self.assertEqual(len(shelves), 3)
|
self.assertEqual(len(shelves), 3)
|
||||||
names = [s.name for s in shelves]
|
names = [s.name for s in shelves]
|
||||||
self.assertEqual(names, ['To Read', 'Currently Reading', 'Read'])
|
self.assertTrue('To Read' in names)
|
||||||
|
self.assertTrue('Currently Reading' in names)
|
||||||
|
self.assertTrue('Read' in names)
|
||||||
ids = [s.identifier for s in shelves]
|
ids = [s.identifier for s in shelves]
|
||||||
self.assertEqual(ids, ['to-read', 'reading', 'read'])
|
self.assertEqual(ids, ['to-read', 'reading', 'read'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue