mirror of
git://holbrook.no/eth-faucet
synced 2026-04-27 02:17:14 +02:00
WIP implement non statechange check
This commit is contained in:
@@ -35,13 +35,12 @@ class TestFaucetPeriod(EthTesterCase):
|
||||
def setUp(self):
|
||||
super(TestFaucetPeriod, self).setUp()
|
||||
# DRY
|
||||
self.conn = RPCConnection.connect(self.chain_spec, 'default')
|
||||
nonce_oracle = RPCNonceOracle(self.accounts[0], self.conn)
|
||||
c = PeriodSimple(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
|
||||
(tx_hash_hex, o) = c.constructor(self.accounts[0])
|
||||
r = self.conn.do(o)
|
||||
|
||||
self.conn = RPCConnection.connect(self.chain_spec, 'default')
|
||||
nonce_oracle = RPCNonceOracle(self.accounts[0], self.conn)
|
||||
|
||||
f = open(os.path.join(datadir, 'PeriodSimple.bin'))
|
||||
period_store_bytecode = f.read()
|
||||
f.close()
|
||||
|
||||
@@ -104,5 +104,13 @@ class TestFaucetRegistry(EthTesterCase):
|
||||
self.assertEqual(r['status'], 1)
|
||||
|
||||
|
||||
def test_transparent(self):
|
||||
nonce_oracle = RPCNonceOracle(self.accounts[0], self.conn)
|
||||
c = EthFaucet(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle)
|
||||
o = c.check(self.address, self.accounts[2], sender_address=self.accounts[0])
|
||||
r = self.conn.do(o)
|
||||
self.assertEqual(int(r, 16), 1)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user