예제 #1
0
def testTrustAnchorSuspensionByTrustee(
        looper, sdk_pool_handle, another_trustee, another_trust_anchor):
    _, did_ta = another_trust_anchor
    sdk_suspend_role(looper, sdk_pool_handle, another_trustee, did_ta)
    with pytest.raises(RequestRejectedException):
        sdk_add_new_nym(looper, sdk_pool_handle,
                        another_trust_anchor, alias=randomString())
예제 #2
0
def testTrusteeSuspendingEndorser(looper, sdk_pool_handle, sdk_wallet_trustee,
                                     sdk_wallet_endorser):
    _, did = sdk_wallet_endorser
    sdk_suspend_role(looper, sdk_pool_handle, sdk_wallet_trustee, did)
    with pytest.raises(RequestRejectedException) as e:
        sdk_add_new_nym(looper, sdk_pool_handle, sdk_wallet_endorser)
    e.match('Rule for this action is')
예제 #3
0
def testTrustAnchorSuspensionByTrustee(
        looper, sdk_pool_handle, another_trustee, another_trust_anchor):
    _, did_ta = another_trust_anchor
    sdk_suspend_role(looper, sdk_pool_handle, another_trustee, did_ta)
    with pytest.raises(RequestRejectedException):
        sdk_add_new_nym(looper, sdk_pool_handle,
                        another_trust_anchor, alias=randomString())
예제 #4
0
def testStewardSuspensionByTrustee(looper, sdk_pool_handle,
                                   another_trustee, another_steward):
    _, did_stew = another_steward
    sdk_suspend_role(looper, sdk_pool_handle, another_trustee, did_stew)
    with pytest.raises(RequestRejectedException):
        sdk_add_new_nym(looper, sdk_pool_handle,
                        another_steward, role=TRUST_ANCHOR_STRING)
예제 #5
0
def testStewardSuspensionByTrustee(looper, sdk_pool_handle,
                                   another_trustee, another_steward):
    _, did_stew = another_steward
    sdk_suspend_role(looper, sdk_pool_handle, another_trustee, did_stew)
    with pytest.raises(RequestRejectedException):
        sdk_add_new_nym(looper, sdk_pool_handle,
                        another_steward, role=TRUST_ANCHOR_STRING)
예제 #6
0
def testTrusteeSuspendingSteward(looper, sdk_pool_handle, sdk_wallet_trustee,
                                 sdk_wallet_steward):
    _, did = sdk_wallet_steward
    sdk_suspend_role(looper, sdk_pool_handle, sdk_wallet_trustee, did)
    with pytest.raises(RequestRejectedException) as e:
        sdk_add_new_nym(looper, sdk_pool_handle, sdk_wallet_steward)
    e.match('There is no accepted constraint')
예제 #7
0
def testTrusteeSuspendingTrustAnchor(looper, sdk_pool_handle, sdk_wallet_trustee,
                                     sdk_wallet_trust_anchor):
    _, did = sdk_wallet_trust_anchor
    sdk_suspend_role(looper, sdk_pool_handle, sdk_wallet_trustee, did)
    with pytest.raises(RequestRejectedException) as e:
        sdk_add_new_nym(looper, sdk_pool_handle, sdk_wallet_trust_anchor)
    e.match('None role cannot add None role')
예제 #8
0
def testTrusteeSuspensionByTrustee(looper, sdk_pool_handle, sdk_wallet_trustee,
                                   another_trustee, another_steward1):
    # trustee suspension by trustee is succeed
    _, did = another_trustee
    sdk_suspend_role(looper, sdk_pool_handle, sdk_wallet_trustee, did)

    # trustee suspension by steward1 is failed
    _, did = sdk_wallet_trustee
    with pytest.raises(RequestRejectedException) as e:
        sdk_suspend_role(looper, sdk_pool_handle, another_steward1, did)
    e.match('is neither Trustee nor owner of')
예제 #9
0
def testTrusteeSuspensionByTrustee(looper, sdk_pool_handle, sdk_wallet_trustee,
                                   another_trustee, another_steward1):
    # trustee suspension by trustee is succeed
    _, did = another_trustee
    sdk_suspend_role(looper, sdk_pool_handle, sdk_wallet_trustee, did)

    # trustee suspension by steward1 is failed
    _, did = sdk_wallet_trustee
    with pytest.raises(RequestRejectedException) as e:
        sdk_suspend_role(looper, sdk_pool_handle, another_steward1, did)
    e.match('{} can not do this action'.format(STEWARD_STRING))
예제 #10
0
def testTrusteeSuspensionByTrustee(looper, sdk_pool_handle, sdk_wallet_trustee,
                                   another_trustee, another_steward1):
    # trustee suspension by trustee is succeed
    _, did = another_trustee
    sdk_suspend_role(looper, sdk_pool_handle, sdk_wallet_trustee, did)

    # trustee suspension by steward1 is failed
    _, did = sdk_wallet_trustee
    with pytest.raises(RequestRejectedException) as e:
        sdk_suspend_role(looper, sdk_pool_handle, another_steward1, did)
    e.match('is neither Trustee nor owner of')
예제 #11
0
def testTrusteeSuspensionByTrustee(looper, sdk_pool_handle, sdk_wallet_trustee,
                                   another_trustee, another_steward1):
    # trustee suspension by trustee is succeed
    _, did = another_trustee
    sdk_suspend_role(looper, sdk_pool_handle, sdk_wallet_trustee, did)

    # trustee suspension by steward1 is failed
    _, did = sdk_wallet_trustee
    with pytest.raises(RequestRejectedException) as e:
        sdk_suspend_role(looper, sdk_pool_handle, another_steward1, did)
    e.match("Not enough TRUSTEE signatures")