Skip to content

Commit ae0962b

Browse files
committed
Add test_deposit_parameters_record.py
1 parent 691e390 commit ae0962b

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

tests/beacon/conftest.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,19 @@ def sample_crosslink_record_params():
131131
'shard_block_hash': b'\x43' * 32,
132132
}
133133

134+
@pytest.fixture
135+
def sample_deposit_parameters_records_params():
136+
return {
137+
# BLS pubkey
138+
'pubkey': 123,
139+
# BLS proof of possession (a BLS signature)
140+
'proof_of_possession': (0, 0),
141+
# Withdrawal credentials
142+
'withdrawal_credentials': b'\11' * 32,
143+
# Initial RANDAO commitment
144+
'randao_commitment': b'\11' * 32,
145+
}
146+
134147

135148
@pytest.fixture
136149
def sample_fork_data_params():
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from eth.beacon.types.deposit_parameters_records import (
2+
DepositParametersRecord,
3+
)
4+
5+
6+
def test_defaults(sample_deposit_parameters_records_params):
7+
deposit_parameters_record = DepositParametersRecord(**sample_deposit_parameters_records_params)
8+
9+
assert deposit_parameters_record.pubkey == sample_deposit_parameters_records_params['pubkey']

0 commit comments

Comments
 (0)