Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Alice/Faber demo to include json-ld credentials and proofs #1235

Merged
merged 18 commits into from
Jun 23, 2021
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion aries_cloudagent/protocols/present_proof/v2_0/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,9 @@ async def present_proof_credentials_list(request: web.BaseRequest):
record_ids = vcrecord_ids_set
dif_credentials = dif_credentials + vcrecord_list
for dif_credential in dif_credentials:
dif_cred_value_list.append(dif_credential.cred_value)
cred_value = dif_credential.cred_value
cred_value["record_id"] = dif_credential.record_id
dif_cred_value_list.append(cred_value)
except (
StorageNotFoundError,
V20PresFormatHandlerError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from asynctest import mock as async_mock
from marshmallow import ValidationError
from time import time
from unittest.mock import ANY

from .....admin.request_context import AdminRequestContext
from .....indy.holder import IndyHolder
Expand Down Expand Up @@ -451,7 +452,10 @@ async def test_present_proof_credentials_list_dif(self):

await test_module.present_proof_credentials_list(self.request)
mock_response.assert_called_once_with(
[{"name": "Credential1"}, {"name": "Credential2"}]
[
{"name": "Credential1", "record_id": ANY},
{"name": "Credential2", "record_id": ANY},
]
)

async def test_present_proof_credentials_list_cred_v1_context_schema_uri(self):
Expand Down Expand Up @@ -584,7 +588,10 @@ async def test_present_proof_credentials_list_schema_uri(self):
mock_pres_ex_rec_cls.retrieve_by_id.return_value = record
await test_module.present_proof_credentials_list(self.request)
mock_response.assert_called_once_with(
[{"name": "Credential1"}, {"name": "Credential2"}]
[
{"name": "Credential1", "record_id": ANY},
{"name": "Credential2", "record_id": ANY},
]
)

async def test_present_proof_credentials_list_dif_error(self):
Expand Down
Loading