def testTrustAnchorSuspensionByTrustee(looper, anotherTrustee, anotherTrustAnchor): trClient, trWallet = anotherTrustee _, spWallet = anotherTrustAnchor suspendRole(looper, trClient, trWallet, spWallet.defaultId) with pytest.raises(AssertionError): addRole(looper, *anotherTrustAnchor, name=randomString())
def testStewardSuspensionByTrustee(looper, anotherTrustee, anotherSteward): trClient, trWallet = anotherTrustee _, stWallet = anotherSteward suspendRole(looper, trClient, trWallet, stWallet.defaultId) with pytest.raises(AssertionError): addRole(looper, *anotherSteward, name=randomString(), role=TRUST_ANCHOR)
def userWalletB(nodeSet, addedSponsor, sponsorWallet, looper, sponsor): return addRole(looper, sponsor, sponsorWallet, 'userB', useDid=False, addVerkey=False)
def userWalletB(nodeSet, addedTrustAnchor, trustAnchorWallet, looper, trustAnchor): return addRole(looper, trustAnchor, trustAnchorWallet, 'userB', addVerkey=False)
def userWalletA(nodeSet, addedTrustAnchor, trustAnchorWallet, looper, trustAnchor): return addRole(looper, trustAnchor, trustAnchorWallet, 'userA', useDid=False, addVerkey=False)
def test_nym_addition_fails_with_empty_verkey(looper, addedTrustAnchor, trustAnchor, trustAnchorWallet): new_wallet = addRole(looper, trustAnchor, trustAnchorWallet, 'userC', useDid=False, addVerkey=False) idy = Identity(identifier=new_wallet.defaultId, verkey='') trustAnchorWallet.updateTrustAnchoredIdentity(idy) reqs = trustAnchorWallet.preparePending() reqs = trustAnchor.submitReqs(*reqs) timeout = waits.expectedReqNAckQuorumTime() looper.run(eventually(checkNacks, trustAnchor, reqs[0].reqId, 'validation error: b58 decoded value length 0 should be one of [32]', retryWait=1, timeout=timeout))
def test_nym_addition_fails_with_empty_verkey(looper, addedTrustAnchor, trustAnchor, trustAnchorWallet): new_wallet = addRole(looper, trustAnchor, trustAnchorWallet, 'userC', useDid=False, addVerkey=False) idy = Identity(identifier=new_wallet.defaultId, verkey='') trustAnchorWallet.updateTrustAnchoredIdentity(idy) reqs = trustAnchorWallet.preparePending() reqs = trustAnchor.submitReqs(*reqs) timeout = waits.expectedReqNAckQuorumTime() looper.run( eventually( checkNacks, trustAnchor, reqs[0].reqId, 'validation error: b58 decoded value length 0 should be one of [32]', retryWait=1, timeout=timeout))
def addNymTxn(looper, anotherTGB): """ Make new NYM transaction The new TGB adds a NYM to ledger """ addRole(looper, *anotherTGB, name=randomString())
def testTrusteeAddingSteward(looper, anotherSteward): # The new Steward adds a SPONSOR addRole(looper, *anotherSteward, name=randomString(), role=SPONSOR)
def testTrusteeAddingSponsor(looper, anotherSponsor): # The new TSponsor adds a NYM addRole(looper, *anotherSponsor, name=randomString())
def testTrusteeAddingSteward(looper, anotherSteward): # The new Steward adds a TRUST_ANCHOR addRole(looper, *anotherSteward, name=randomString(), role=TRUST_ANCHOR)
def testTrusteeAddingTGB(looper, anotherTGB): # The new TGB adds a NYM addRole(looper, *anotherTGB, name=randomString())
def testTrusteeAddingTrustAnchor(looper, anotherTrustAnchor): # The new TTrustAnchor adds a NYM addRole(looper, *anotherTrustAnchor, name=randomString())
def userWalletB(nodeSet, addedTrustAnchor, trustAnchorWallet, looper, trustAnchor): return addRole(looper, trustAnchor, trustAnchorWallet, 'userB', useDid=False, addVerkey=False)
def userWalletA(nodeSet, addedSponsor, sponsorWallet, looper, sponsor): return addRole(looper, sponsor, sponsorWallet, 'userA', useDid=False)