Ejemplo n.º 1
0
 def test_unbound_ong(self):
     acct1_unbound_ong = sdk.native_vm.asset().query_unbound_ong(
         acct1.get_address_base58())
     self.assertGreaterEqual(int(acct1_unbound_ong), 0)
     acct2_unbound_ong = sdk.native_vm.asset().query_unbound_ong(
         acct4.get_address_base58())
     self.assertGreaterEqual(int(acct2_unbound_ong), 0)
     acct3_unbound_ong = sdk.native_vm.asset().query_unbound_ong(
         acct4.get_address_base58())
     self.assertGreaterEqual(int(acct3_unbound_ong), 0)
     acct4_unbound_ong = sdk.native_vm.asset().query_unbound_ong(
         acct4.get_address_base58())
     self.assertGreaterEqual(int(acct4_unbound_ong), 0)
Ejemplo n.º 2
0
 def test_unbound_ong(self):
     b58_address1 = acct1.get_address_base58()
     b58_address2 = acct2.get_address_base58()
     b58_address3 = acct3.get_address_base58()
     b58_address4 = acct4.get_address_base58()
     try:
         acct1_unbound_ong = sdk.native_vm.asset().query_unbound_ong(
             b58_address1)
         self.assertGreaterEqual(acct1_unbound_ong, 0)
     except SDKException as e:
         self.assertIn('ConnectTimeout', e.args[1])
     try:
         acct2_unbound_ong = sdk.native_vm.asset().query_unbound_ong(
             b58_address2)
         self.assertGreaterEqual(acct2_unbound_ong, 0)
     except SDKException as e:
         self.assertIn('ConnectTimeout', e.args[1])
     try:
         acct3_unbound_ong = sdk.native_vm.asset().query_unbound_ong(
             b58_address3)
         self.assertGreaterEqual(acct3_unbound_ong, 0)
     except SDKException as e:
         self.assertIn('ConnectTimeout', e.args[1])
     try:
         acct4_unbound_ong = sdk.native_vm.asset().query_unbound_ong(
             b58_address4)
         self.assertGreaterEqual(acct4_unbound_ong, 0)
     except SDKException as e:
         self.assertIn('ConnectTimeout', e.args[1])
Ejemplo n.º 3
0
 def test_get_balance(self):
     b58_address = acct4.get_address_base58()
     event_loop = asyncio.get_event_loop()
     balance = event_loop.run_until_complete(
         TestWebsocketClient.get_balance(b58_address))
     self.assertGreaterEqual(balance['ont'], 1)
     self.assertGreaterEqual(balance['ong'], 1)
Ejemplo n.º 4
0
 def test_balance_of(self):
     contract_address = '1ddbb682743e9d9e2b71ff419e97a9358c5c4ee9'
     oep4 = sdk.neo_vm.oep4()
     oep4.hex_contract_address = contract_address
     b58_address1 = acct3.get_address_base58()
     b58_address2 = acct4.get_address_base58()
     balance = oep4.balance_of(b58_address1)
     self.assertGreaterEqual(balance, 10)
     balance = oep4.balance_of(b58_address2)
     self.assertGreaterEqual(balance, 1)