Add seal set part of interface test

This commit is contained in:
lash 2023-06-08 16:55:48 +01:00
parent fe4f1c2c41
commit 45ca79cf46
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
2 changed files with 20 additions and 2 deletions

View File

@ -12,10 +12,28 @@ class TestEthSealInterface:
self.max_seal_state = 0
def test_supply(self):
def test_default_seal(self):
if self.max_seal_state == 0:
return
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))
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))

View File

@ -1,6 +1,6 @@
[metadata]
name = cic-contracts
version = 0.3.5
version = 0.3.6
description = CIC network smart contract interfaces
author = Louis Holbrook
author_email = dev@holbrook.no