Skip to content

Commit f870e76

Browse files
committed
feat: adapt unit tests to recent sepolia scenario
1 parent 3030188 commit f870e76

File tree

6 files changed

+7466
-9
lines changed

6 files changed

+7466
-9
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dependencies = [
2222
"cachetools>=5.3.3",
2323
"pybind11>=2.12.0",
2424
"vcrpy>=6.0.1",
25+
"pytest-timeout>=2.4.0",
2526
]
2627

2728
[project.optional-dependencies]

tests/assets/cassettes/test_sepolia.yaml

Lines changed: 7454 additions & 0 deletions
Large diffs are not rendered by default.

tests/assets/config.sepolia.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ beacon_timeout_sec: 720
33
network: sepolia
44
metrics_port: 8000
55

6-
#replay_start_at_ts: 1744096730
7-
#replay_end_at_ts: 1744097880
6+
replay_start_at_ts: 1747989420
7+
replay_end_at_ts: 1747989960
88

99
watched_keys:
1010
- public_key: '989fa046d04b41fc95a04dabb7ab8b64e84afaa85c0aa49e1c6878d7b2814094402d62ae42dfbf3ac72e6770ee0926a8'

tests/assets/config.sepolia_replay_2_slots.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
beacon_url: http://localhost:3500/
1+
beacon_url: http://localhost:5052/
22
beacon_timeout_sec: 90
33
network: sepolia
44
metrics_port: 8000
55

6-
replay_start_at_ts: 1744096730
7-
replay_end_at_ts: 1744096760
6+
replay_start_at_ts: 1747989420
7+
replay_end_at_ts: 1747989450
88

99
watched_keys:
1010
- public_key: '989fa046d04b41fc95a04dabb7ab8b64e84afaa85c0aa49e1c6878d7b2814094402d62ae42dfbf3ac72e6770ee0926a8'

tests/assets/config.sepolia_replay_5_slots.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
beacon_url: http://localhost:3500/
1+
beacon_url: http://localhost:5052/
22
beacon_timeout_sec: 90
33
network: sepolia
44
metrics_port: 8000
55

6-
replay_start_at_ts: 17440967030
7-
replay_end_at_ts: 1744096785
6+
replay_start_at_ts: 1747989420
7+
replay_end_at_ts: 1747989985
88

99
watched_keys:
1010
- public_key: '989fa046d04b41fc95a04dabb7ab8b64e84afaa85c0aa49e1c6878d7b2814094402d62ae42dfbf3ac72e6770ee0926a8'

tests/test_beacon.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ def test_get_validators(self) -> None:
201201
"pubkey": "0xabcdef1234567890",
202202
"effective_balance": 32000000000,
203203
"slashed": False,
204-
"activation_epoch": 100
204+
"activation_epoch": 100,
205+
"withdrawal_credentials": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
205206
}
206207
}
207208
]
@@ -216,6 +217,7 @@ def test_get_validators(self) -> None:
216217
self.assertEqual(result.data[0].status, "active_ongoing")
217218
self.assertEqual(result.data[0].validator.effective_balance, 32000000000)
218219
self.assertFalse(result.data[0].validator.slashed)
220+
self.assertEqual(result.data[0].validator.withdrawal_credentials, "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890")
219221

220222
def test_get_rewards(self) -> None:
221223
"""Test get_rewards() returns reward data."""

0 commit comments

Comments
 (0)