Skip to content

Commit 6590b9a

Browse files
Fix test_get_casm_hash_method_for_starknet_version (#1674)
1 parent 1f74e31 commit 6590b9a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

starknet_py/tests/unit/hash/casm_class_hash_test.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# fmt: off
22
import pytest
3+
from semver import Version
34

45
from starknet_py.common import create_casm_class
56
from 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

Comments
 (0)