Skip to content

Commit

Permalink
Merge pull request #702 from sklump/find-missing-tails-file
Browse files Browse the repository at this point in the history
do not assume as issuer that local tails file is in place
  • Loading branch information
andrewwhitehead authored Aug 28, 2020
2 parents 6f143f4 + 3950758 commit d2d1475
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ async def issue_credential(
registry = await active_reg.get_registry()
cred_ex_record.revoc_reg_id = active_reg.revoc_reg_id
tails_path = registry.tails_local_path
await registry.get_or_fetch_local_tails_path()

credential_values = CredentialProposal.deserialize(
cred_ex_record.credential_proposal_dict
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,11 @@ async def test_issue_credential(self):
async_mock.MagicMock(
get_registry=async_mock.CoroutineMock(
return_value=async_mock.MagicMock(
tails_local_path="dummy-path", max_creds=1000
get_or_fetch_local_tails_path=(
async_mock.CoroutineMock()
),
tails_local_path="dummy-path",
max_creds=1000,
)
),
mark_full=async_mock.CoroutineMock(),
Expand Down Expand Up @@ -1109,7 +1113,10 @@ async def test_issue_credential_rr_full(self):
async_mock.MagicMock(
get_registry=async_mock.CoroutineMock(
return_value=async_mock.MagicMock(
tails_local_path="dummy-path"
get_or_fetch_local_tails_path=(
async_mock.CoroutineMock()
),
tails_local_path="dummy-path",
)
),
revoc_reg_id=REV_REG_ID,
Expand Down Expand Up @@ -1169,7 +1176,9 @@ async def test_issue_credential_rr_full_rr_staged_retry(self):
async_mock.MagicMock(
get_registry=async_mock.CoroutineMock(
return_value=async_mock.MagicMock(
tails_local_path="dummy-path", max_creds=revocation_id
get_or_fetch_local_tails_path=async_mock.CoroutineMock(),
tails_local_path="dummy-path",
max_creds=revocation_id,
)
),
revoc_reg_id=REV_REG_ID,
Expand All @@ -1181,7 +1190,9 @@ async def test_issue_credential_rr_full_rr_staged_retry(self):
async_mock.MagicMock(
get_registry=async_mock.CoroutineMock(
return_value=async_mock.MagicMock(
tails_local_path="dummy-path", max_creds=1000
get_or_fetch_local_tails_path=async_mock.CoroutineMock(),
tails_local_path="dummy-path",
max_creds=1000,
)
),
revoc_reg_id=REV_REG_ID,
Expand All @@ -1192,7 +1203,10 @@ async def test_issue_credential_rr_full_rr_staged_retry(self):
pending_reg = [
async_mock.MagicMock(
get_registry=async_mock.CoroutineMock(
return_value=async_mock.MagicMock(tails_local_path="dummy-path")
return_value=async_mock.MagicMock(
get_or_fetch_local_tails_path=async_mock.CoroutineMock(),
tails_local_path="dummy-path",
)
),
revoc_reg_id=REV_REG_ID,
mark_full=async_mock.CoroutineMock(),
Expand Down

0 comments on commit d2d1475

Please sign in to comment.