Esempio n. 1
0
 def test_abnormal_029_getrawtransaction(self):
     try:
         (process, response) = API.rpc().getrawtransaction("abc")
         self.ASSERT(not process, "")
     except Exception as e:
         logger.print(e.args[0])
Esempio n. 2
0
	def test_abnormal_073_getbalancebyaddr(self):
		try:
			(process, response) = API.ws().getbalancebyaddr(test_config.ACCOUNT_ADDRESS_INCORRECT_3)
			self.ASSERT(not process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 3
0
	def test_abnormal_080_getcontract(self):
		try:
			(process, response) = API.ws().getcontract(test_config.CONTRACT_ADDRESS_INCORRECT_4)
			self.ASSERT(not process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 4
0
	def test_abnormal_060_gettransaction(self):
		try:
			(process, response) = API.ws().gettransaction(test_config.TX_HASH_INCORRECT_4)
			self.ASSERT(not process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 5
0
	def test_abnormal_065_sendrawtransaction(self):
		try:
			(process, response) = API.ws().sendrawtransaction(test_config.RAW_TRANSACTION_DATA_INCORRECT_1)
			self.ASSERT(not process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 6
0
	def test_base_049_getblockhashbyheight(self):
		try:
			(process, response) = API.ws().getblockhashbyheight(test_config.HEIGHT_CORRECT)
			self.ASSERT(process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 7
0
	def test_abnormal_054_getblockhashbyheight(self):
		try:
			(process, response) = API.ws().getblockhashbyheight(test_config.HEIGHT_INCORRECT_3)
			self.ASSERT(not process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 8
0
 def test_abnormal_083_getblockheightbytxhash(self):
     try:
         (process, response) = API.rpc().getblockheightbytxhash(tx_hash=123)
         self.ASSERT(not process, "")
     except Exception as e:
         logger.print(e.args[0])
Esempio n. 9
0
 def test_abnormal_088_getbalance(self):
     try:
         (process, response) = API.rpc().getbalance(None)
         self.ASSERT(not process, "")
     except Exception as e:
         logger.print(e.args[0])
Esempio n. 10
0
 def test_abnormal_073_getmempooltxstate(self):
     try:
         (process, response) = API.rpc().getmempooltxstate(None)
         self.ASSERT(not process, "")
     except Exception as e:
         logger.print(e.args[0])
Esempio n. 11
0
 def test_abnormal_077_getsmartcodeevent(self):
     try:
         (process, response) = API.rpc().getsmartcodeevent(height=None)
         self.ASSERT(not process, "")
     except Exception as e:
         logger.print(e.args[0])
Esempio n. 12
0
 def test_abnormal_062_getcontractstate(self):
     try:
         (process, response) = API.rpc().getcontractstate(None, 1)
         self.ASSERT(not process, "")
     except Exception as e:
         logger.print(e.args[0])
Esempio n. 13
0
 def test_base_051_getversion(self):
     try:
         (process, response) = API.rpc().getversion()
         self.ASSERT(process, "")
     except Exception as e:
         logger.print(e.args[0])
Esempio n. 14
0
 def test_abnormal_040_sendrawtransaction(self):
     try:
         (process, response) = API.rpc().sendrawtransaction(None)
         self.ASSERT(not process, "")
     except Exception as e:
         logger.print(e.args[0])
Esempio n. 15
0
	def test_abnormal_046_getblockbyhash(self):
		try:
			(process, response) = API.ws().getblockbyhash(test_config.BLOCK_HASH_INCORRECT_4)
			self.ASSERT(not process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 16
0
 def test_abnormal_093_getmerkleproof(self):
     try:
         (process, response) = API.rpc().getmerkleproof(None)
         self.ASSERT(not process, "")
     except Exception as e:
         logger.print(e.args[0])
Esempio n. 17
0
	def test_base_047_getblockheight(self):
		try:
			(process, response) = API.ws().getblockheight()
			self.ASSERT(process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 18
0
	def test_normal_006_subscribe(self):
		try:
			(process, response) = API.ws().subscribe([test_config.CONTRACT_ADDRESS_INCORRECT_3])
			self.ASSERT(process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 19
0
	def test_normal_051_getblockhashbyheight(self):
		try:
			(process, response) = API.ws().getblockhashbyheight(test_config.HEIGHT_BORDER)
			self.ASSERT(process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 20
0
	def test_normal_011_subscribe(self):
		try:
			(process, response) = API.ws().subscribe(None, sevent=0)
			self.ASSERT(process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 21
0
	def test_base_055_gettransaction(self):
		try:
			(process, response) = API.ws().gettransaction(test_config.TX_HASH_CORRECT)
			self.ASSERT(process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 22
0
	def test_normal_023_subscribe(self):
		try:
			(process, response) = API.ws().subscribe([test_config.CONTRACT_ADDRESS_CORRECT], sblocktxhashs=0)
			self.ASSERT(process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 23
0
	def test_base_061_sendrawtransaction(self):
		try:
			(process, response) = API.ws().sendrawtransaction(test_config.RAW_TRANSACTION_DATA_CORRECT)
			self.ASSERT(process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 24
0
	def test_base_026_getconnectioncount(self):
		try:
			(process, response) = API.ws().getconnectioncount()
			self.ASSERT(process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 25
0
	def test_base_070_getbalancebyaddr(self):
		try:
			(process, response) = API.ws().getbalancebyaddr(test_config.ACCOUNT_ADDRESS_CORRECT)
			self.ASSERT(process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 26
0
	def test_normal_028_getconnectioncount(self):
		try:
			(process, response) = API.ws().getconnectioncount({"height":"1"})
			self.ASSERT(process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 27
0
	def test_base_075_getcontract(self):
		try:
			(process, response) = API.ws().getcontract(test_config.CONTRACT_ADDRESS_CORRECT)
			self.ASSERT(process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 28
0
	def test_base_041_getblockbyhash(self):
		try:
			(process, response) = API.ws().getblockbyhash(test_config.BLOCK_HASH_CORRECT)
			self.ASSERT(process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 29
0
	def test_normal_084_getsmartcodeeventbyheight(self):
		try:
			(process, response) = API.ws().getsmartcodeeventbyheight(test_config.HEIGHT_INCORRECT_1)
			self.ASSERT(process, "")
		except Exception as e:
			logger.print(e.args[0])
Esempio n. 30
0
 def test_base_022_getblockcount(self):
     try:
         (process, response) = API.rpc().getblockcount()
         self.ASSERT(process, "")
     except Exception as e:
         logger.print(e.args[0])