Skip to content

Commit 1497970

Browse files
committed
fix: update client test
1 parent d3a2f3e commit 1497970

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pragma-sdk/tests/integration/update_client_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ async def declare_oracle(forked_client: PragmaOnChainClient) -> DeclareResult:
5757
except ClientError as err:
5858
if "is already declared" in err.message:
5959
hash_str = (
60-
err.message.split('ClassHash(StarkFelt("')[1]
61-
.split('"))')[0]
62-
.replace("0x", "")
60+
err.data["execution_error"]
61+
.split("Class with hash ")[1]
62+
.split(" is already declared")[0]
6363
)
64-
return MagicMock(class_hash=int(f"0x{hash_str}", 16))
64+
return MagicMock(class_hash=int(hash_str, 16))
6565
else:
6666
logger.info("An error occured during the declaration: %s", err)
6767
raise err

0 commit comments

Comments
 (0)