mirror of
git://holbrook.no/eth-accounts-index
synced 2026-04-29 20:51:04 +02:00
- Updates data from compiled solc.
This commit is contained in:
@@ -50,8 +50,8 @@ class Test(EthTesterCase):
|
||||
(tx_hash, o) = c.constructor(self.accounts[0])
|
||||
self.conn = RPCConnection.connect(self.chain_spec, 'default')
|
||||
r = self.conn.do(o)
|
||||
logg.debug('deployed with hash {}'.format(r))
|
||||
|
||||
logg.debug(f'deployed with hash {r}')
|
||||
|
||||
o = receipt(r)
|
||||
r = self.conn.do(o)
|
||||
self.address = to_checksum_address(r['contract_address'])
|
||||
@@ -133,6 +133,37 @@ class Test(EthTesterCase):
|
||||
|
||||
#self.assertFalse(registry.have(self.w3.eth.accounts[3]))
|
||||
|
||||
def test_5_remove(self):
|
||||
nonce_oracle = RPCNonceOracle(self.accounts[0], self.conn)
|
||||
c = AccountsIndex(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
|
||||
|
||||
b = os.urandom(20)
|
||||
a = to_checksum_address(b.hex())
|
||||
(tx_hash, o) = c.add(self.address, self.accounts[0], a)
|
||||
r = self.conn.do(o)
|
||||
|
||||
o = c.entry_count(self.address, sender_address=self.accounts[0])
|
||||
r = self.conn.do(o)
|
||||
count = c.parse_entry_count(r)
|
||||
self.assertEqual(count, 1)
|
||||
|
||||
b = os.urandom(20)
|
||||
a = to_checksum_address(b.hex())
|
||||
(tx_hash, o) = c.add(self.address, self.accounts[0], a)
|
||||
r = self.conn.do(o)
|
||||
|
||||
o = c.entry_count(self.address, sender_address=self.accounts[0])
|
||||
r = self.conn.do(o)
|
||||
count = c.parse_entry_count(r)
|
||||
self.assertEqual(count, 2)
|
||||
|
||||
(tx_hash, o) = c.remove(self.address, self.accounts[0], a)
|
||||
r = self.conn.do(o)
|
||||
|
||||
o = c.entry_count(self.address, sender_address=self.accounts[0])
|
||||
r = self.conn.do(o)
|
||||
count = c.parse_entry_count(r)
|
||||
self.assertEqual(count, 1)
|
||||
|
||||
|
||||
# TODO: reinstate all tests
|
||||
|
||||
Reference in New Issue
Block a user