Skip to content

Commit e8828e5

Browse files
committed
Create test_module.py and add tests for attach_methods()
1 parent 9983dce commit e8828e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/core/module-class/test_module.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_attach_methods_to_module(web3_with_external_modules):
2727

2828
w3.module1.attach_methods({
2929
# set `property1` on `module1` with `eth_chainId` RPC endpoint
30-
'property1': Method('eth_chainId', is_property=True),
30+
'property1': Method('eth_chainId', set_as_property=True),
3131
# set `method1` on `module1` with `eth_getBalance` RPC endpoint
3232
'method1': Method('eth_getBalance'),
3333
})
@@ -41,7 +41,7 @@ def test_attach_methods_to_module(web3_with_external_modules):
4141

4242
w3.module2.submodule1.attach_methods({
4343
# set `method2` on `module2.submodule1` with `eth_blockNumber` RPC endpoint
44-
'method2': Method('eth_blockNumber', is_property=True)
44+
'method2': Method('eth_blockNumber', set_as_property=True)
4545
})
4646

4747
assert w3.eth.block_number == 0

0 commit comments

Comments
 (0)