From b89f04b1f18ed7259d0a4b2b440e3cd166e1b907 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Sat, 20 Jul 2019 13:30:41 -0400 Subject: [PATCH] fix claim integration tests --- lbry/tests/integration/test_claim_commands.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lbry/tests/integration/test_claim_commands.py b/lbry/tests/integration/test_claim_commands.py index ce2343d90..7eec987de 100644 --- a/lbry/tests/integration/test_claim_commands.py +++ b/lbry/tests/integration/test_claim_commands.py @@ -89,6 +89,7 @@ class ClaimSearchCommand(ClaimTestCase): await self.assertFindsClaims([claim], **kwargs) async def assertFindsClaims(self, claims, **kwargs): + kwargs.setdefault('order_by', ['height', '^name']) results = await self.claim_search(**kwargs) self.assertEqual(len(claims), len(results)) for claim, result in zip(claims, results): @@ -165,15 +166,15 @@ class ClaimSearchCommand(ClaimTestCase): await self.create_channel() await self.create_lots_of_streams() - page = await self.claim_search(page_size=20, channel='@abc') + page = await self.claim_search(page_size=20, channel='@abc', order_by=['height', '^name']) page_claim_ids = [item['name'] for item in page] self.assertEqual(page_claim_ids, self.streams) - page = await self.claim_search(page_size=6, channel='@abc') + page = await self.claim_search(page_size=6, channel='@abc', order_by=['height', '^name']) page_claim_ids = [item['name'] for item in page] self.assertEqual(page_claim_ids, self.streams[:6]) - page = await self.claim_search(page=2, page_size=6, channel='@abc') + page = await self.claim_search(page=2, page_size=6, channel='@abc', order_by=['height', '^name']) page_claim_ids = [item['name'] for item in page] self.assertEqual(page_claim_ids, self.streams[6:])