Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vgorkavenko committed Apr 22, 2024
1 parent e7cb8f8 commit 3f113dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/providers/consensus/typings.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ class BlockAttestation(Nested, FromResponse):


@dataclass
class BeaconBlockBody(Nested):
class BeaconBlockBody(Nested, FromResponse):
execution_payload: ExecutionPayload
attestations: list[BlockAttestation]


@dataclass
class BlockMessage(Nested):
class BlockMessage(Nested, FromResponse):
slot: str
proposer_index: str
parent_root: str
Expand Down
4 changes: 2 additions & 2 deletions tests/providers_clients/test_http_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_no_providers():

def test_all_fallbacks_ok():
provider = HTTPProvider(['http://localhost:1', 'http://localhost:2'], 5 * 60, 1, 1)
provider._get_without_fallbacks = lambda host, endpoint, path_params, query_params, stream: (host, endpoint)
provider._get_without_fallbacks = lambda host, endpoint, path_params, query_params: (host, endpoint)
assert provider._get('test') == ('http://localhost:1', 'test')
assert len(provider.get_all_providers()) == 2

Expand Down Expand Up @@ -60,4 +60,4 @@ def _simple_get(host, endpoint, *_):
provider._get_without_fallbacks = Mock(side_effect=_simple_get)
with pytest.raises(CustomError):
provider._get('test', force_raise=lambda _: CustomError())
provider._get_without_fallbacks.assert_called_once_with('http://localhost:1', 'test', None, None, False)
provider._get_without_fallbacks.assert_called_once_with('http://localhost:1', 'test', None, None)

0 comments on commit 3f113dd

Please sign in to comment.