Пример #1
0
import sys, getopt

sys.path.append('..')

from utils.config import Config
from utils.taskdata import TaskData, Task
from utils.logger import LoggerInstance
from utils.hexstring import *
from utils.error import Error
from utils.rpcapi import RPCApi
from utils.parametrizedtestcase import ParametrizedTestCase
from utils.init_ong_ont import *
from utils.commonapi import *

from test_api import *
rpcapiTest=RPCApi()
logger = LoggerInstance
node_index=5
nodePath="/home/ubuntu/ontology/node"
contract_address=deploy_contract("ont_neo.json")
pay_address=Config.NODES[node_index]["address"]
get_address=Config.NODES[2]["address"]
amount="10"
sender=Config.NODES[2]["address"]
sender_node=2
senderType=False

##############################
from1= pay_address  #from_正确的from值_正常
from2= "1111111111111111111111111111"  #from_错误的from值(参数不正确)_异常
from3= ""  #from_留空_异常
Пример #2
0
# -*- coding: utf-8 -*-
import sys
sys.path.append('..')

from utils.config import Config
from utils.taskdata import TaskData, Task
from utils.logger import LoggerInstance as logger
from utils.hexstring import *
from utils.error import Error
from utils.commonapi import *
from utils.contractapi import *
from utils.parametrizedtestcase import ParametrizedTestCase
from utils.rpcapi import RPCApi

rpcApi = RPCApi()

def get_signed_data():
    request = {
        "REQUEST": {
        "Qid":"t",
        "Method":"signativeinvoketx",
        "Params":{
                "gas_price":0,
                "gas_limit":1000000000,
                "address":"0100000000000000000000000000000000000000",
                "method":"name",
                "version":0,
                "params":[]
            }
        },
        "RESPONSE": {
Пример #3
0
from utils.parametrizedtestcase import ParametrizedTestCase

from utils.commonapi import *
from utils.rpcapi import RPCApi
from utils.init_ong_ont import *
from utils.contractapi import *
from test_governance_api.test_api import nodeCountCheck
logger = LoggerInstance

####################################################
# test cases
# 请准备 9个节点进行测试
#
#

rpcapi = RPCApi()

PRICE_TEST = 10000
COST_RADIX = 20600000


xi_table = [
	0, 100000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000, 1000000, 1100000, 1200000, 1300000, 1400000,
	1500000, 1600000, 1700000, 1800000, 1900000, 2000000, 2100000, 2200000, 2300000, 2400000, 2500000, 2600000, 2700000,
	2800000, 2900000, 3000000, 3100000, 3200000, 3300000, 3400000, 3500000, 3600000, 3700000, 3800000, 3900000, 4000000,
	4100000, 4200000, 4300000, 4400000, 4500000, 4600000, 4700000, 4800000, 4900000, 5000000, 5100000, 5200000, 5300000,
	5400000, 5500000, 5600000, 5700000, 5800000, 5900000, 6000000, 6100000, 6200000, 6300000, 6400000, 6500000, 6600000,
	6700000, 6800000, 6900000, 7000000, 7100000, 7200000, 7300000, 7400000, 7500000, 7600000, 7700000, 7800000, 7900000,
	8000000, 8100000, 8200000, 8300000, 8400000, 8500000, 8600000, 8700000, 8800000, 8900000, 9000000, 9100000, 9200000,
	9300000, 9400000, 9500000, 9600000, 9700000, 9800000, 9900000, 10000000,
	]