11# fmt: off
22import pytest
3+ from semver import Version
34
45from starknet_py .common import create_casm_class
56from starknet_py .hash .casm_class_hash import (
@@ -55,7 +56,7 @@ def test_precompiled_compute_casm_class_hash_with_poseidon(casm_contract_class_s
5556
5657
5758@pytest .mark .parametrize (
58- "rpc_version , expected_hash_method" ,
59+ "starknet_version , expected_hash_method" ,
5960 [
6061 ("0.13.5" , HashMethod .POSEIDON ),
6162 ("0.14.0" , HashMethod .POSEIDON ),
@@ -65,9 +66,10 @@ def test_precompiled_compute_casm_class_hash_with_poseidon(casm_contract_class_s
6566 ("1.10.0" , HashMethod .BLAKE2S ),
6667 ],
6768)
68- def test_get_casm_hash_method_for_starknet_version (rpc_version , expected_hash_method ):
69+ def test_get_casm_hash_method_for_starknet_version (starknet_version , expected_hash_method ):
6970 """Test that the correct hash method is returned for different Starknet versions."""
70- hash_method = get_casm_hash_method_for_starknet_version (rpc_version )
71+ starknet_version = Version .parse (starknet_version )
72+ hash_method = get_casm_hash_method_for_starknet_version (starknet_version )
7173 assert hash_method == expected_hash_method
7274
7375
0 commit comments