Ensure test client specifies max supply in unittest

This commit is contained in:
lash
2023-06-08 14:39:46 +01:00
parent 5ff686e513
commit 80589e574a
4 changed files with 7 additions and 5 deletions

View File

@@ -31,7 +31,9 @@ class TestEthCapped(EthTesterCase):
txf = TxFactory(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
tx = txf.template(self.accounts[0], None, use_nonce=True)
self.max_supply_value = 1024
if getattr(self, 'max_supply_value', None) == None:
self.max_supply_value = 1024
enc = ABIContractEncoder()
enc.uint256(self.max_supply_value)
args = enc.get()

View File

@@ -12,7 +12,7 @@ class TestEthCappedInterface:
self.max_supply_value = 0
def test_supply(self):
def test_default_supply(self):
if self.max_supply_value == 0:
return
c = EthCapped(self.chain_spec)
@@ -25,7 +25,7 @@ class TestEthCappedInterface:
if self.set_method == None:
return
self.max_supply_value = 2048
self.max_supply_value *= 2
(tx_hash_hex, o) = self.set_method(self.address, self.accounts[0], self.max_supply_value)
self.rpc.do(o)
o = receipt(tx_hash_hex)