def test_serializeForSig_MINT_PUBLIC_path(helpers, node, addresses): [SF_address, user1_address] = addresses token_authnr = TokenAuthNr(node[0].states[DOMAIN_LEDGER_ID]) outputs = [[SF_address, 30], [user1_address, 30]] request = helpers.request.mint(outputs) msg = request.as_dict serialize_for_sig_called = token_authnr.serializeForSig( msg, VALID_IDENTIFIER, None) token_authnr.serializeForSig.assert_called()
def test_serializeForSig_MINT_PUBLIC_path(helpers, node, addresses): [SF_address, user1_address] = addresses token_authnr = TokenAuthNr(ACCEPTABLE_WRITE_TYPES, ACCEPTABLE_QUERY_TYPES, ACCEPTABLE_ACTION_TYPES, node[0].db_manager.idr_cache) outputs = [[SF_address, 30], [user1_address, 30]] request = helpers.request.mint(outputs) msg = request.as_dict serialize_for_sig_called = token_authnr.serializeForSig( msg, VALID_IDENTIFIER, None) token_authnr.serializeForSig.assert_called()
def test_serializeForSig_XFER_PUBLIC_path(node, user2_token_wallet, user2_address, SF_token_wallet, SF_address, user1_address): token_authnr = TokenAuthNr(node[0].states[DOMAIN_LEDGER_ID]) inputs = [[user2_token_wallet, user2_address, 1], [SF_token_wallet, SF_address, 2]] outputs = [[user1_address, 10], [user1_address, 10]] request = xfer_request(inputs, outputs) msg = request.as_dict serialize_for_sig_called = token_authnr.serializeForSig( msg, VALID_IDENTIFIER, None) assert serialize_for_sig_called == True
def test_serializeForSig_XFER_PUBLIC_path(node, user2_token_wallet, user2_address, SF_token_wallet, SF_address, user1_address): token_authnr = TokenAuthNr(ACCEPTABLE_WRITE_TYPES, ACCEPTABLE_QUERY_TYPES, ACCEPTABLE_ACTION_TYPES, node[0].db_manager.idr_cache) inputs = [[user2_token_wallet, user2_address, 1], [SF_token_wallet, SF_address, 2]] outputs = [[user1_address, 10], [user1_address, 10]] request = xfer_request(inputs, outputs) msg = request.as_dict serialize_for_sig_called = token_authnr.serializeForSig( msg, VALID_IDENTIFIER, None) assert serialize_for_sig_called == True