Skip to content

Commit

Permalink
Fix non waiting in test
Browse files Browse the repository at this point in the history
Signed-off-by: jamshale <jamiehalebc@gmail.com>
  • Loading branch information
jamshale committed Feb 19, 2024
1 parent d6315d2 commit c002bf5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions aries_cloudagent/multitenant/admin/tests/test_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ async def test_wallet_create_tenant_settings(self):
}
self.request.json = mock.CoroutineMock(return_value=body)

with mock.patch.object(test_module.web, "json_response") as mock_response:
with mock.patch.object(test_module, "attempt_auto_author_with_endorser_setup"
) as mock_auto_author_attempt, mock.patch.object(test_module.web, "json_response") as mock_response:
wallet_mock = mock.MagicMock(
serialize=mock.MagicMock(
return_value={
Expand Down Expand Up @@ -202,6 +203,7 @@ async def test_wallet_create_tenant_settings(self):
{**test_module.format_wallet_record(wallet_mock), "token": "test_token"}
)
assert self.mock_multitenant_mgr.get_wallet_profile.called
assert mock_auto_author_attempt.called

async def test_wallet_create(self):
body = {
Expand All @@ -215,7 +217,8 @@ async def test_wallet_create(self):
}
self.request.json = mock.CoroutineMock(return_value=body)

with mock.patch.object(test_module.web, "json_response") as mock_response:
with mock.patch.object(test_module, "attempt_auto_author_with_endorser_setup"
) as mock_auto_author_attempt, mock.patch.object(test_module.web, "json_response") as mock_response:
wallet_mock = mock.MagicMock(
serialize=mock.MagicMock(
return_value={
Expand Down Expand Up @@ -258,6 +261,7 @@ async def test_wallet_create(self):
}
)
assert self.mock_multitenant_mgr.get_wallet_profile.called
assert mock_auto_author_attempt.called

async def test_wallet_create_x(self):
body = {}
Expand Down

0 comments on commit c002bf5

Please sign in to comment.