def testSendNymFailsForCryptonymIdentifierAnsdk_pool_handlemittedVerkey( looper, sdk_pool_handle, txnPoolNodeSet, nym_request, sdk_wallet_trustee): parameters = {'dest': createCryptonym(), 'role': TRUST_ANCHOR} nym_request[OPERATION].update(parameters) request_couple = sdk_sign_and_send_prepared_request( looper, sdk_wallet_trustee, sdk_pool_handle, json.dumps(nym_request)) sdk_get_and_check_replies(looper, [request_couple])
def testSendNymFailsForCryptonymIdentifierAndFullVerkey( looper, sdk_pool_handle, txnPoolNodeSet, nym_request, sdk_wallet_trustee): cryptonym = createCryptonym() _, fullVerkey = createUuidIdentifierAndFullVerkey() parameters = {'dest': cryptonym, 'verkey': fullVerkey, 'role': ENDORSER} nym_request[OPERATION].update(parameters) request_couple = sdk_sign_and_send_prepared_request( looper, sdk_wallet_trustee, sdk_pool_handle, json.dumps(nym_request)) sdk_get_and_check_replies(looper, [request_couple])
def testSendNymFailsForCryptonymIdentifierAndMatchedAbbrevVerkey( looper, sdk_pool_handle, txnPoolNodeSet, nym_request, sdk_wallet_trustee): cryptonym = createCryptonym() hexCryptonym = friendlyToHex(cryptonym) abbrevVerkey = '~' + hexToFriendly(hexCryptonym[16:]) parameters = {'dest': cryptonym, 'verkey': abbrevVerkey, 'role': ENDORSER} nym_request[OPERATION].update(parameters) request_couple = sdk_sign_and_send_prepared_request( looper, sdk_wallet_trustee, sdk_pool_handle, json.dumps(nym_request)) sdk_get_bad_response(looper, [request_couple], RequestNackedException, 'Neither a full verkey nor an abbreviated one')
def testSendGetNymFailsIfCryptonymIsPassedAsDest( looper, sdk_pool_handle, sdk_wallet_trustee): get_nym(looper, sdk_pool_handle, sdk_wallet_trustee, createCryptonym())