Add writer to token index deploy in eth tests

This commit is contained in:
nolash
2021-11-29 15:05:09 +01:00
parent b85390fc36
commit 69a0aea7ed
6 changed files with 69 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ from hexathon import (
from funga.eth.keystore.dict import DictKeystore
from eth_address_declarator.declarator import AddressDeclarator
from okota.token_index.index import TokenUniqueSymbolIndexAddressDeclarator
from cic_contracts.writer import CICWriter
# local imports
from cic.ext.eth import CICEth
@@ -69,6 +70,14 @@ class TestCICEthBase(EthTesterCase):
self.token_index_address = r['contract_address']
logg.debug('token index deployed at {}'.format(self.token_index_address))
c = CICWriter(self.chain_spec, self.signer, nonce_oracle=nonce_oracle, gas_oracle=gas_oracle)
(tx_hash_hex, o) = c.add_writer(self.token_index_address, addresses[1], addresses[1])
r = self.rpc.do(o)
o = receipt(r)
r = self.rpc.do(o)
Tx.src_normalize(r)
self.assertEqual(r['status'], 1)
self.resources = {
'token': {
'reference': self.token_address,

View File

@@ -72,6 +72,7 @@ class TestCICEthRPC(TestCICEthTokenBase):
self.adapter.process()
results = self.adapter.get_outputs()
for v in results:
logg.debug('checking result for {}'.format(v[0]))
o = receipt(v[1])
r = self.rpc.do(o)
self.assertEqual(r['status'], 1)