Skip to content

Commit

Permalink
Create test_module.py and add tests for attach_methods()
Browse files Browse the repository at this point in the history
  • Loading branch information
fselmo committed Mar 8, 2022
1 parent 9983dce commit e8828e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/core/module-class/test_module.py
Expand Up @@ -27,7 +27,7 @@ def test_attach_methods_to_module(web3_with_external_modules):

w3.module1.attach_methods({
# set `property1` on `module1` with `eth_chainId` RPC endpoint
'property1': Method('eth_chainId', is_property=True),
'property1': Method('eth_chainId', set_as_property=True),
# set `method1` on `module1` with `eth_getBalance` RPC endpoint
'method1': Method('eth_getBalance'),
})
Expand All @@ -41,7 +41,7 @@ def test_attach_methods_to_module(web3_with_external_modules):

w3.module2.submodule1.attach_methods({
# set `method2` on `module2.submodule1` with `eth_blockNumber` RPC endpoint
'method2': Method('eth_blockNumber', is_property=True)
'method2': Method('eth_blockNumber', set_as_property=True)
})

assert w3.eth.block_number == 0
Expand Down

0 comments on commit e8828e5

Please sign in to comment.