33 lines
974 B
Python
33 lines
974 B
Python
|
# standard imports
|
||
|
import unittest
|
||
|
import logging
|
||
|
|
||
|
# external imports
|
||
|
from chainlib.eth.tx import receipt
|
||
|
from eth_capped.unittest import TestEthCappedInterface
|
||
|
from eth_capped.unittest.base import TestEthCapped
|
||
|
from ge_capped_token.unittest import TestCappedToken
|
||
|
|
||
|
logging.basicConfig(level=logging.DEBUG)
|
||
|
logg = logging.getLogger()
|
||
|
|
||
|
|
||
|
class TestEthCappedCapped(TestEthCapped, TestCappedToken, TestEthCappedInterface):
|
||
|
|
||
|
def setUp(self):
|
||
|
super(TestEthCappedCapped, self).setUp()
|
||
|
self.set_method = self.set_max_supply
|
||
|
self.max_supply_value = self.initial_supply + 1
|
||
|
self.publish()
|
||
|
(tx_hash, o) = self.set_method(self.address, self.accounts[0], self.max_supply_value)
|
||
|
self.rpc.do(o)
|
||
|
o = receipt(tx_hash)
|
||
|
r = self.rpc.do(o)
|
||
|
self.assertEqual(r['status'], 1)
|
||
|
self.contracts['capped'] = self.address
|
||
|
self.roles['capped'] = self.accounts[0]
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
unittest.main()
|