Skip to content

Commit

Permalink
fix: mock is_ledger_read_only
Browse files Browse the repository at this point in the history
Signed-off-by: Char Howland <[email protected]>
  • Loading branch information
cjhowland authored and swcurran committed Aug 23, 2022
1 parent 8a76a91 commit 34090a3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aries_cloudagent/ledger/tests/test_indy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2328,9 +2328,11 @@ async def test_construct_attr_json_with_routing_keys(self, mock_close, mock_open
@async_mock.patch("indy.ledger.build_get_attrib_request")
@async_mock.patch("indy.ledger.build_attrib_request")
@async_mock.patch("aries_cloudagent.ledger.indy.IndySdkLedger._submit")
@async_mock.patch("aries_cloudagent.ledger.indy.IndySdkLedger.is_ledger_read_only")
@pytest.mark.asyncio
async def test_update_endpoint_for_did_calls_attr_json(
self,
mock_is_ledger_read_only,
mock_submit,
mock_build_attrib_req,
mock_build_get_attrib_req,
Expand All @@ -2341,6 +2343,7 @@ async def test_update_endpoint_for_did_calls_attr_json(
mock_wallet = async_mock.MagicMock()
self.session.context.injector.bind_provider(BaseWallet, mock_wallet)
ledger = IndySdkLedger(IndySdkLedgerPool("name", checked=True), self.profile)
mock_is_ledger_read_only.return_value = False
async with ledger:
with async_mock.patch.object(
IndySdkWallet, "get_public_did"
Expand Down

0 comments on commit 34090a3

Please sign in to comment.