Exemplo n.º 1
0
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())
Exemplo n.º 2
0
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)
Exemplo n.º 3
0
def userWalletB(nodeSet, addedSponsor, sponsorWallet, looper, sponsor):
    return addRole(looper,
                   sponsor,
                   sponsorWallet,
                   'userB',
                   useDid=False,
                   addVerkey=False)
Exemplo n.º 4
0
def userWalletB(nodeSet, addedTrustAnchor, trustAnchorWallet, looper,
                trustAnchor):
    return addRole(looper,
                   trustAnchor,
                   trustAnchorWallet,
                   'userB',
                   addVerkey=False)
Exemplo n.º 5
0
def userWalletA(nodeSet, addedTrustAnchor, trustAnchorWallet, looper,
                trustAnchor):
    return addRole(looper,
                   trustAnchor,
                   trustAnchorWallet,
                   'userA',
                   useDid=False,
                   addVerkey=False)
Exemplo n.º 6
0
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))
Exemplo n.º 7
0
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))
Exemplo n.º 8
0
def addNymTxn(looper, anotherTGB):
    """
    Make new NYM transaction
    The new TGB adds a NYM to ledger
    """
    addRole(looper, *anotherTGB, name=randomString())
Exemplo n.º 9
0
def testTrusteeAddingSteward(looper, anotherSteward):
    # The new Steward adds a SPONSOR
    addRole(looper, *anotherSteward, name=randomString(), role=SPONSOR)
Exemplo n.º 10
0
def testTrusteeAddingSponsor(looper, anotherSponsor):
    # The new TSponsor adds a NYM
    addRole(looper, *anotherSponsor, name=randomString())
Exemplo n.º 11
0
def testTrusteeAddingSteward(looper, anotherSteward):
    # The new Steward adds a TRUST_ANCHOR
    addRole(looper, *anotherSteward, name=randomString(), role=TRUST_ANCHOR)
Exemplo n.º 12
0
def testTrusteeAddingTGB(looper, anotherTGB):
    # The new TGB adds a NYM
    addRole(looper, *anotherTGB, name=randomString())
Exemplo n.º 13
0
def testTrusteeAddingTrustAnchor(looper, anotherTrustAnchor):
    # The new TTrustAnchor adds a NYM
    addRole(looper, *anotherTrustAnchor, name=randomString())
Exemplo n.º 14
0
def testTrusteeAddingTGB(looper, anotherTGB):
    # The new TGB adds a NYM
    addRole(looper, *anotherTGB, name=randomString())
Exemplo n.º 15
0
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)
Exemplo n.º 16
0
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())
Exemplo n.º 17
0
def testTrusteeAddingTrustAnchor(looper, anotherTrustAnchor):
    # The new TTrustAnchor adds a NYM
    addRole(looper, *anotherTrustAnchor, name=randomString())
Exemplo n.º 18
0
def userWalletB(nodeSet, addedTrustAnchor, trustAnchorWallet, looper, trustAnchor):
    return addRole(looper, trustAnchor, trustAnchorWallet, 'userB', useDid=False,
                   addVerkey=False)
Exemplo n.º 19
0
def userWalletA(nodeSet, addedSponsor, sponsorWallet, looper, sponsor):
    return addRole(looper, sponsor, sponsorWallet, 'userA', useDid=False)