@@ -78,6 +78,23 @@ def test_trace_transaction(self, web3: "Web3", parity_fixture_data: Dict[str, st
7878 trace = web3 .parity .traceTransaction (HexStr (parity_fixture_data ['mined_txn_hash' ]))
7979 assert trace [0 ]['action' ]['from' ] == add_0x_prefix (HexStr (parity_fixture_data ['coinbase' ]))
8080
81+ def test_traceCall_deprecated (
82+ self , web3 : "Web3" , math_contract : "Contract" , math_contract_address : ChecksumAddress
83+ ) -> None :
84+ coinbase = web3 .eth .coinbase
85+ txn_params = math_contract ._prepare_transaction (
86+ fn_name = 'add' ,
87+ fn_args = (7 , 11 ),
88+ transaction = {'from' : coinbase , 'to' : math_contract_address },
89+ )
90+ with pytest .warns (DeprecationWarning ,
91+ match = "traceCall is deprecated in favor of trace_call" ):
92+ trace = web3 .parity .traceCall (txn_params )
93+ assert trace ['stateDiff' ] is None
94+ assert trace ['vmTrace' ] is None
95+ result = hex_to_integer (trace ['output' ])
96+ assert result == 18
97+
8198 def test_trace_call (
8299 self , web3 : "Web3" , math_contract : "Contract" , math_contract_address : ChecksumAddress
83100 ) -> None :
@@ -87,13 +104,13 @@ def test_trace_call(
87104 fn_args = (7 , 11 ),
88105 transaction = {'from' : coinbase , 'to' : math_contract_address },
89106 )
90- trace = web3 .parity .traceCall (txn_params )
107+ trace = web3 .parity .trace_call (txn_params )
91108 assert trace ['stateDiff' ] is None
92109 assert trace ['vmTrace' ] is None
93110 result = hex_to_integer (trace ['output' ])
94111 assert result == 18
95112
96- def test_eth_call_with_0_result (
113+ def test_trace_call_with_0_result (
97114 self , web3 : "Web3" , math_contract : "Contract" , math_contract_address : ChecksumAddress
98115 ) -> None :
99116 coinbase = web3 .eth .coinbase
@@ -102,7 +119,7 @@ def test_eth_call_with_0_result(
102119 fn_args = (0 , 0 ),
103120 transaction = {'from' : coinbase , 'to' : math_contract_address },
104121 )
105- trace = web3 .parity .traceCall (txn_params )
122+ trace = web3 .parity .trace_call (txn_params )
106123 assert trace ['stateDiff' ] is None
107124 assert trace ['vmTrace' ] is None
108125 result = hex_to_integer (trace ['output' ])
0 commit comments