def testRetrieveAbbrvVerkey(didAddedWithAbbrvVerkey, looper, trustAnchor, trustAnchorWallet, wallet, abbrevIdr): """{ type: GET_NYM, dest: <id1> }""" identity = Identity(identifier=abbrevIdr) req = trustAnchorWallet.requestIdentity(identity, sender=trustAnchorWallet.defaultId) trustAnchor.submitReqs(req) def chk(): retrievedVerkey = trustAnchorWallet.getIdentity(abbrevIdr).verkey assertEquality(retrievedVerkey, wallet.getVerkey(abbrevIdr)) checkAbbrVerkeySize(retrievedVerkey) looper.run(eventually(chk, retryWait=1, timeout=5)) chkVerifyForRetrievedIdentity(wallet, trustAnchorWallet, abbrevIdr)
def testRetrieveAbbrvVerkey(didAddedWithAbbrvVerkey, looper, trustAnchor, trustAnchorWallet, wallet, abbrevIdr): """{ type: GET_NYM, dest: <id1> }""" identity = Identity(identifier=abbrevIdr) req = trustAnchorWallet.requestIdentity(identity, sender=trustAnchorWallet.defaultId) trustAnchor.submitReqs(req) def chk(): retrievedVerkey = trustAnchorWallet.getIdentity(abbrevIdr).verkey assertEquality(retrievedVerkey, wallet.getVerkey(abbrevIdr)) checkAbbrVerkeySize(retrievedVerkey) timeout = plenumWaits.expectedReqAckQuorumTime() looper.run(eventually(chk, retryWait=1, timeout=timeout)) chkVerifyForRetrievedIdentity(wallet, trustAnchorWallet, abbrevIdr)
def testRetrieveFullVerkey(didAddedWithFullVerkey, looper, sponsor, sponsorWallet, wallet, fullKeyIdr): """{ type: GET_NYM, dest: <id1> }""" identity = Identity(identifier=fullKeyIdr) req = sponsorWallet.requestIdentity(identity, sender=sponsorWallet.defaultId) sponsor.submitReqs(req) def chk(): retrievedVerkey = sponsorWallet.getIdentity(fullKeyIdr).verkey assert retrievedVerkey == wallet.getVerkey(fullKeyIdr) checkFullVerkeySize(retrievedVerkey) looper.run(eventually(chk, retryWait=1, timeout=5)) chkVerifyForRetrievedIdentity(wallet, sponsorWallet, fullKeyIdr)
def testRetrieveFullVerkey(didAddedWithFullVerkey, looper, trustAnchor, trustAnchorWallet, wallet, fullKeyIdr): """{ type: GET_NYM, dest: <id1> }""" identity = Identity(identifier=fullKeyIdr) req = trustAnchorWallet.requestIdentity(identity, sender=trustAnchorWallet.defaultId) trustAnchor.submitReqs(req) def chk(): retrievedVerkey = trustAnchorWallet.getIdentity(fullKeyIdr).verkey assert retrievedVerkey == wallet.getVerkey(fullKeyIdr) checkFullVerkeySize(retrievedVerkey) timeout = plenumWaits.expectedReqAckQuorumTime() looper.run(eventually(chk, retryWait=1, timeout=timeout)) chkVerifyForRetrievedIdentity(wallet, trustAnchorWallet, fullKeyIdr)
def testVerifySigWithChangedVerkey(didUpdatedWithVerkey, verkeyFetched, trustAnchorWallet, noKeyIdr, wallet): chkVerifyForRetrievedIdentity(wallet, trustAnchorWallet, noKeyIdr)
def testVerifySigWithChangedVerkey(didUpdatedWithFullVerkey, newVerkeyFetched, trustAnchorWallet, abbrevIdr, wallet): chkVerifyForRetrievedIdentity(wallet, trustAnchorWallet, abbrevIdr)
def testVerifySigWithChangedVerkey(didUpdatedWithFullVerkey, newVerkeyFetched, trustAnchorWallet, abbrevIdr, wallet): chkVerifyForRetrievedIdentity(wallet, trustAnchorWallet, abbrevIdr)
def testVerifySigWithChangedVerkey(didUpdatedWithFullVerkey, newVerkeyFetched, sponsorWallet, fullKeyIdr, wallet): chkVerifyForRetrievedIdentity(wallet, sponsorWallet, fullKeyIdr)