diff --git a/aries_cloudagent/ledger/tests/test_indy.py b/aries_cloudagent/ledger/tests/test_indy.py index 43669fbb43..529ad6a95f 100644 --- a/aries_cloudagent/ledger/tests/test_indy.py +++ b/aries_cloudagent/ledger/tests/test_indy.py @@ -253,7 +253,7 @@ async def test_send_schema( ) mock_submit.assert_called_once_with( - mock_build_schema_req.return_value, True, True + mock_build_schema_req.return_value, True, sign_did=mock_wallet.get_public_did.return_value ) assert schema_id == mock_create_schema.return_value[0] @@ -329,7 +329,7 @@ async def test_get_schema( mock_wallet.get_public_did.assert_called_once_with() mock_build_get_schema_req.assert_called_once_with(mock_did.did, "schema_id") mock_submit.assert_called_once_with( - mock_build_get_schema_req.return_value, public_did=mock_did.did + mock_build_get_schema_req.return_value, sign_did=mock_did ) mock_parse_get_schema_req.assert_called_once_with(mock_submit.return_value) @@ -424,7 +424,7 @@ async def test_get_credential_definition( mock_did.did, "cred_def_id" ) mock_submit.assert_called_once_with( - mock_build_get_cred_def_req.return_value, public_did=mock_did.did + mock_build_get_cred_def_req.return_value, sign_did=mock_did ) mock_parse_get_cred_def_req.assert_called_once_with( mock_submit.return_value diff --git a/aries_cloudagent/protocols/issue_credential/v1_0/tests/test_manager.py b/aries_cloudagent/protocols/issue_credential/v1_0/tests/test_manager.py index d5177b093d..ac69f2a087 100644 --- a/aries_cloudagent/protocols/issue_credential/v1_0/tests/test_manager.py +++ b/aries_cloudagent/protocols/issue_credential/v1_0/tests/test_manager.py @@ -167,9 +167,12 @@ async def test_create_free_offer(self): ) as get_cached_key, async_mock.patch.object( V10CredentialExchange, "set_cached_key", autospec=True ) as set_cached_key: + self.ledger.get_credential_definition = async_mock.CoroutineMock( + return_value={"value": {}} + ) get_cached_key.return_value = None cred_offer = {"cred_def_id": cred_def_id, "schema_id": schema_id} - issuer = async_mock.MagicMock() + issuer = async_mock.MagicMock(BaseIssuer, autospec=True) issuer.create_credential_offer = async_mock.CoroutineMock( return_value=cred_offer ) @@ -214,9 +217,12 @@ async def test_create_bound_offer(self): ) as set_cached_key, async_mock.patch.object( CredentialManager, "_match_sent_cred_def_id", autospec=True ) as match_cred_def_id: + self.ledger.get_credential_definition = async_mock.CoroutineMock( + return_value={"value": {}} + ) get_cached_key.return_value = None cred_offer = {"cred_def_id": cred_def_id, "schema_id": schema_id} - issuer = async_mock.MagicMock() + issuer = async_mock.MagicMock(BaseIssuer, autospec=True) issuer.create_credential_offer = async_mock.CoroutineMock( return_value=cred_offer ) @@ -459,7 +465,7 @@ async def test_issue_credential(self): save_ex.assert_called_once() issuer.create_credential.assert_called_once_with( - schema, indy_offer, indy_cred_req, cred_values + schema, indy_offer, indy_cred_req, cred_values, None, None ) assert ret_exchange.credential == cred