def jobCertClaimRequested(be, do, aliceCli, preRequisite, jobCertificateClaimMap, reqClaimOut1, jobApplicationProofSent): def removeSchema(): inviter = jobCertificateClaimMap["inviter"] links = aliceCli.activeWallet.getMatchingLinks(inviter) assert len(links) == 1 faberId = links[0].remoteIdentifier name, version = jobCertificateClaimMap["name"], \ jobCertificateClaimMap["version"] aliceCli.activeWallet._schemas.pop((name, version, faberId)) # Removing schema to check if it fetches the schema again or not # removeSchema() be(aliceCli) totalClaimsRcvdBefore = getTotalClaimsRcvd(aliceCli) do("request claim {name}", within=7, expect=reqClaimOut1, mapper=jobCertificateClaimMap) assert totalClaimsRcvdBefore + 1 == getTotalClaimsRcvd(aliceCli)
def jobCertClaimRequested(be, do, aliceCli, preRequisite, jobCertificateClaimMap, reqClaimOut1, jobApplicationProofSent): def removeSchema(): inviter = jobCertificateClaimMap["inviter"] links = aliceCli.activeWallet.getMatchingLinks(inviter) assert len(links) == 1 faberId = links[0].remoteIdentifier name, version = jobCertificateClaimMap["name"], \ jobCertificateClaimMap["version"] aliceCli.activeWallet._schemas.pop((name, version, faberId)) # Removing schema to check if it fetches the schema again or not # removeSchema() be(aliceCli) totalClaimsRcvdBefore = getTotalClaimsRcvd(aliceCli) do("request claim {name}", within=7, expect=reqClaimOut1, mapper=jobCertificateClaimMap) assert totalClaimsRcvdBefore + 1 == getTotalClaimsRcvd(aliceCli)
def aliceRequestedTranscriptClaim(be, do, aliceCli, transcriptClaimMap, reqClaimOut, preRequisite, aliceAcceptedFaberInvitation): be(aliceCli) totalClaimsRcvdBefore = getTotalClaimsRcvd(aliceCli) do("request claim {name}", within=5, expect=reqClaimOut, mapper=transcriptClaimMap) async def assertTotalClaimsRcvdIncreasedByOne(): assert totalClaimsRcvdBefore + 1 == \ len((await aliceCli.agent.prover.wallet.getAllClaims()).keys()) aliceCli.looper.run( eventually(assertTotalClaimsRcvdIncreasedByOne, timeout=2))
def aliceRequestedTranscriptClaim(be, do, aliceCli, transcriptClaimMap, reqClaimOut, preRequisite, alice_accepted_faber_request): be(aliceCli) totalClaimsRcvdBefore = getTotalClaimsRcvd(aliceCli) do("request claim {name}", within=5, expect=reqClaimOut, mapper=transcriptClaimMap) async def assertTotalClaimsRcvdIncreasedByOne(): total_claims = len((await aliceCli.agent.prover.wallet.getAllClaimsSignatures()).keys()) assert totalClaimsRcvdBefore + 1 == total_claims aliceCli.looper.runFor(10) timeout = waits.expectedClaimsReceived() aliceCli.looper.run( eventually(assertTotalClaimsRcvdIncreasedByOne, timeout=timeout))
def aliceRequestedTranscriptClaim(be, do, aliceCli, transcriptClaimMap, reqClaimOut, preRequisite, aliceAcceptedFaberInvitation): be(aliceCli) totalClaimsRcvdBefore = getTotalClaimsRcvd(aliceCli) do("request claim {name}", within=5, expect=reqClaimOut, mapper=transcriptClaimMap) async def assertTotalClaimsRcvdIncreasedByOne(): total_claims = len((await aliceCli.agent.prover.wallet.getAllClaimsSignatures()).keys()) assert totalClaimsRcvdBefore + 1 == total_claims aliceCli.looper.runFor(10) timeout = waits.expectedClaimsReceived() aliceCli.looper.run( eventually(assertTotalClaimsRcvdIncreasedByOne, timeout=timeout))