Add seal set part of interface test
This commit is contained in:
parent
fe4f1c2c41
commit
45ca79cf46
@ -12,10 +12,28 @@ class TestEthSealInterface:
|
|||||||
self.max_seal_state = 0
|
self.max_seal_state = 0
|
||||||
|
|
||||||
|
|
||||||
def test_supply(self):
|
def test_default_seal(self):
|
||||||
if self.max_seal_state == 0:
|
if self.max_seal_state == 0:
|
||||||
return
|
return
|
||||||
c = EthSeal(self.chain_spec)
|
c = EthSeal(self.chain_spec)
|
||||||
o = c.max_seal_state(self.address, sender_address=self.accounts[0])
|
o = c.max_seal_state(self.address, sender_address=self.accounts[0])
|
||||||
r = self.rpc.do(o)
|
r = self.rpc.do(o)
|
||||||
self.assertEqual(self.max_seal_state, int(r, 16))
|
self.assertEqual(self.max_seal_state, int(r, 16))
|
||||||
|
|
||||||
|
|
||||||
|
def test_seal_set(self):
|
||||||
|
if self.set_method == None:
|
||||||
|
return
|
||||||
|
if self.max_seal_state == 0:
|
||||||
|
return
|
||||||
|
|
||||||
|
(tx_hash, o) = self.set_method(self.contracts['seal'], self.accounts[0], self.max_seal_state)
|
||||||
|
self.rpc.do(o)
|
||||||
|
o = receipt(tx_hash)
|
||||||
|
r = self.rpc.do(o)
|
||||||
|
self.assertEqual(r['status'], 1)
|
||||||
|
|
||||||
|
c = EthSeal(self.chain_spec)
|
||||||
|
o = c.max_seal_state(self.address, sender_address=self.accounts[0])
|
||||||
|
r = self.rpc.do(o)
|
||||||
|
self.assertEqual(self.max_seal_state, int(r, 16))
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = cic-contracts
|
name = cic-contracts
|
||||||
version = 0.3.5
|
version = 0.3.6
|
||||||
description = CIC network smart contract interfaces
|
description = CIC network smart contract interfaces
|
||||||
author = Louis Holbrook
|
author = Louis Holbrook
|
||||||
author_email = dev@holbrook.no
|
author_email = dev@holbrook.no
|
||||||
|
Loading…
Reference in New Issue
Block a user