Skip to content

Commit f0ba7da

Browse files
committed
test: multitenant manager get profile for key
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
1 parent 7cd74a9 commit f0ba7da

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

aries_cloudagent/multitenant/tests/test_base.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,3 +620,18 @@ async def test_get_wallets_by_message(self):
620620
assert wallets[0] == return_wallets[0]
621621
assert wallets[1] == return_wallets[3]
622622
assert get_wallet_by_key.call_count == 4
623+
624+
async def test_get_profile_for_key(self):
625+
mock_wallet = async_mock.MagicMock()
626+
mock_wallet.requires_external_key = False
627+
with async_mock.patch.object(
628+
self.manager,
629+
"_get_wallet_by_key",
630+
async_mock.CoroutineMock(return_value=mock_wallet),
631+
), async_mock.patch.object(
632+
self.manager, "get_wallet_profile", async_mock.CoroutineMock()
633+
) as mock_get_wallet_profile:
634+
profile = await self.manager.get_profile_for_key(
635+
self.context, "test-verkey"
636+
)
637+
assert profile == mock_get_wallet_profile.return_value

0 commit comments

Comments
 (0)