chainlib-eth

Ethereum implementation of the chainlib interface
Log | Files | Refs | README | LICENSE

commit cf71c3fedf6acd0750e986249b066d280da400d6
parent a6f39e302baf7bc6304e3799f5010922af8e08b3
Author: lash <dev@holbrook.no>
Date:   Fri, 16 Dec 2022 09:03:33 +0000

Remove redundant filter test

Diffstat:
Mtests/test_block.py | 42------------------------------------------
1 file changed, 0 insertions(+), 42 deletions(-)

diff --git a/tests/test_block.py b/tests/test_block.py @@ -71,47 +71,5 @@ class TestBlock(unittest.TestCase): self.assertEqual(to_blockheight_param(1), '0x0000000000000001') - def test_block_filter(self): - class TestFilter(DialectFilter): - - def apply_block(self, block): - block.extra['foo'] = 'bar' - block.number = 24 - return block - - tx_one_src = { - 'hash': os.urandom(32).hex(), - 'from': os.urandom(20).hex(), - 'to': os.urandom(20).hex(), - 'value': 13, - 'data': '0xdeadbeef', - 'nonce': 666, - 'gasPrice': 100, - 'gas': 21000, - } - tx_two_src_hash = os.urandom(32).hex() - - block_hash = os.urandom(32).hex() - parent_hash = os.urandom(32).hex() - block_author = os.urandom(20).hex() - block_time = datetime.datetime.utcnow().timestamp() - block_src = { - 'number': 42, - 'hash': block_hash, - 'author': block_author, - 'transactions': [ - tx_one_src, - tx_two_src_hash, - ], - 'timestamp': block_time, - 'gas_used': '0x1234', - 'gas_limit': '0x2345', - 'parent_hash': parent_hash - } - block = Block(block_src, dialect_filter=TestFilter()) - self.assertEqual(block.extra['foo'], 'bar') - self.assertEqual(block.number, 24) - - if __name__ == '__main__': unittest.main()