From 6445449e7062c4e62cba0fa54c58ba15db3c0a91 Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 16 Aug 2024 23:37:53 +0300 Subject: [PATCH] :white_check_mark: fix assertions Signed-off-by: ff137 --- .../messaging/models/tests/test_base_record.py | 15 ++++++++++++++- .../connections/v1_0/tests/test_routes.py | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/aries_cloudagent/messaging/models/tests/test_base_record.py b/aries_cloudagent/messaging/models/tests/test_base_record.py index 06fb281a9d..fc71e7be3f 100644 --- a/aries_cloudagent/messaging/models/tests/test_base_record.py +++ b/aries_cloudagent/messaging/models/tests/test_base_record.py @@ -169,6 +169,8 @@ async def test_query(self): result = await BaseRecordImpl.query(session, tag_filter) mock_storage.find_all_records.assert_awaited_once_with( type_filter=BaseRecordImpl.RECORD_TYPE, + order_by=None, + descending=False, tag_query=tag_filter, ) assert result and isinstance(result[0], BaseRecordImpl) @@ -221,6 +223,8 @@ async def test_query_post_filter(self): mock_storage.find_all_records.assert_awaited_once_with( type_filter=ARecordImpl.RECORD_TYPE, tag_query=tag_filter, + order_by=None, + descending=False, ) assert result and isinstance(result[0], ARecordImpl) assert result[0]._id == record_id @@ -344,6 +348,8 @@ async def test_query_with_limit(self): tag_query=tag_filter, limit=10, offset=0, + order_by=None, + descending=False, ) assert result and isinstance(result[0], ARecordImpl) assert result[0]._id == record_id @@ -374,6 +380,8 @@ async def test_query_with_offset(self): tag_query=tag_filter, limit=DEFAULT_PAGE_SIZE, offset=10, + order_by=None, + descending=False, ) assert result and isinstance(result[0], ARecordImpl) assert result[0]._id == record_id @@ -404,6 +412,8 @@ async def test_query_with_limit_and_offset(self): tag_query=tag_filter, limit=10, offset=5, + order_by=None, + descending=False, ) assert result and isinstance(result[0], ARecordImpl) assert result[0]._id == record_id @@ -436,7 +446,10 @@ async def test_query_with_limit_and_offset_and_post_filter(self): post_filter_positive={"a": "one"}, ) mock_storage.find_all_records.assert_awaited_once_with( - type_filter=ARecordImpl.RECORD_TYPE, tag_query=tag_filter + type_filter=ARecordImpl.RECORD_TYPE, + tag_query=tag_filter, + order_by=None, + descending=False, ) assert len(result) == 10 assert result and isinstance(result[0], ARecordImpl) diff --git a/aries_cloudagent/protocols/connections/v1_0/tests/test_routes.py b/aries_cloudagent/protocols/connections/v1_0/tests/test_routes.py index 83fdaf10b9..f969edb602 100644 --- a/aries_cloudagent/protocols/connections/v1_0/tests/test_routes.py +++ b/aries_cloudagent/protocols/connections/v1_0/tests/test_routes.py @@ -103,6 +103,8 @@ async def test_connections_list(self): }, limit=100, offset=0, + order_by="id", + descending=False, post_filter_positive={ "their_role": list(ConnRecord.Role.REQUESTER.value), "connection_protocol": "connections/1.0",