Skip to content

Commit

Permalink
add node validator data equality check to the test_nor_state test case
Browse files Browse the repository at this point in the history
  • Loading branch information
katamarinaki committed Oct 2, 2023
1 parent eab06cb commit 606ec0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 9 additions & 0 deletions tests/acceptance/test_node_operators_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ def test_nor_state(contract):

assert node_operator_summary["depositableValidatorsCount"] is not None

assert node_operator["totalExitedValidators"] == node_operator_summary["totalExitedValidators"]
assert node_operator["totalDepositedValidators"] == node_operator_summary["totalDepositedValidators"]

no_depositable_validators_count = (
node_operator["totalVettedValidators"] - node_operator["totalDepositedValidators"]
)

assert node_operator_summary["depositableValidatorsCount"] == no_depositable_validators_count


def _str_to_bytes32(s: str) -> str:
return "0x{:0<64}".format(s.encode("utf-8").hex())
1 change: 0 additions & 1 deletion tests/test_2023_10_03.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def test_vote(helpers, accounts, vote_ids_from_env, bypass_events_decoding, inte
# Check that all NOs are unknown yet (1-7)
for node_operator in NEW_NODE_OPERATORS:
with reverts("OUT_OF_RANGE"):
print(f"node_operator.id = {node_operator.id}")
no = nor.getNodeOperator(node_operator.id, True)

# 8)
Expand Down

0 comments on commit 606ec0d

Please sign in to comment.