mirror of
https://github.com/grassrootseconomics/erc20-pool.git
synced 2024-11-26 21:56:46 +01:00
Add interface test
This commit is contained in:
parent
365c84d88b
commit
dd0aa11c6e
@ -59,5 +59,6 @@ class TestERC20Pool(TestGiftableToken):
|
||||
r = self.rpc.do(o)
|
||||
self.assertEqual(r['status'], 1)
|
||||
self.pool_address = to_checksum_address(r['contract_address'])
|
||||
self.address = self.pool_address
|
||||
logg.debug('published bar token {}, baz token {}'.format(self.bar_address, self.baz_address))
|
||||
logg.debug('published pool on address {} with hash {}'.format(self.pool_address, tx_hash))
|
||||
|
@ -12,15 +12,11 @@ from giftable_erc20_token import GiftableToken
|
||||
# local imports
|
||||
from erc20_pool.unittest import TestERC20Pool
|
||||
from erc20_pool import Pool
|
||||
#from evm_tokenvote.unittest.base import hash_of_foo
|
||||
#from evm_tokenvote import Voter
|
||||
#from evm_tokenvote import ProposalState
|
||||
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
logg = logging.getLogger()
|
||||
|
||||
class TestPoolBase(TestERC20Pool):
|
||||
class TestPoolFee(TestERC20Pool):
|
||||
|
||||
def test_swap_fee(self):
|
||||
nonce_oracle = RPCNonceOracle(self.accounts[0], conn=self.conn)
|
||||
|
32
python/tests/test_interface.py
Normal file
32
python/tests/test_interface.py
Normal file
@ -0,0 +1,32 @@
|
||||
# standard imports
|
||||
import unittest
|
||||
import logging
|
||||
import os
|
||||
from chainlib.eth.nonce import RPCNonceOracle
|
||||
from chainlib.eth.tx import receipt
|
||||
from chainlib.eth.block import block_latest
|
||||
from hexathon import same as same_hex
|
||||
from eth_erc20 import ERC20
|
||||
from giftable_erc20_token import GiftableToken
|
||||
from eth_interface.unittest import TestERC165
|
||||
|
||||
# local imports
|
||||
from erc20_pool.unittest import TestERC20Pool
|
||||
from erc20_pool import Pool
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
logg = logging.getLogger()
|
||||
|
||||
TestERC165.add_interface_check('9493f8b2')
|
||||
TestERC165.add_interface_check('0d7491f8')
|
||||
|
||||
class TestPoolInterface(TestERC20Pool, TestERC165):
|
||||
|
||||
def test_interface(self):
|
||||
self.address = self.pool_address
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
Loading…
Reference in New Issue
Block a user