Skip to content

Commit 43d08f3

Browse files
committed
test: base wallet route manager and recip to conn
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
1 parent d2dbf5c commit 43d08f3

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

aries_cloudagent/multitenant/tests/test_route_manager.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def route_manager(root_profile: Profile, sub_profile: Profile, wallet_id: str):
5858

5959

6060
@pytest.fixture
61-
def base_route_manager(root_profile: Profile, sub_profile: Profile, wallet_id: str):
62-
yield BaseWalletRouteManager(root_profile)
61+
def base_route_manager():
62+
yield BaseWalletRouteManager()
6363

6464

6565
@pytest.mark.asyncio
@@ -371,17 +371,15 @@ async def test_routing_info_with_base_mediator_and_sub_mediator(
371371

372372
@pytest.mark.asyncio
373373
async def test_connection_from_recipient_key(
374-
sub_profile: Profile, base_route_manager: MultitenantRouteManager
374+
sub_profile: Profile, base_route_manager: BaseWalletRouteManager
375375
):
376376
manager = mock.MagicMock()
377377
manager.get_profile_for_key = mock.CoroutineMock(return_value=sub_profile)
378-
route_manager.root_profile.context.injector.bind_instance(
379-
BaseMultitenantManager, manager
380-
)
378+
sub_profile.context.injector.bind_instance(BaseMultitenantManager, manager)
381379
with mock.patch.object(
382380
RouteManager, "connection_from_recipient_key", mock.CoroutineMock()
383381
) as mock_conn_for_recip:
384-
result = await route_manager.connection_from_recipient_key(
385-
route_manager.root_profile, TEST_VERKEY
382+
result = await base_route_manager.connection_from_recipient_key(
383+
sub_profile, TEST_VERKEY
386384
)
387385
assert result == mock_conn_for_recip.return_value

aries_cloudagent/protocols/coordinate_mediation/v1_0/tests/test_route_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ async def test_connection_from_recipient_key_invite(
487487
):
488488
with mock.patch.object(
489489
ConnRecord,
490-
"retrieve_by_invitation_key",
490+
"retrieve_by_tag_filter",
491491
mock.CoroutineMock(return_value=conn_record),
492492
):
493493
result = await route_manager.connection_from_recipient_key(profile, TEST_VERKEY)

0 commit comments

Comments
 (0)