Skip to content

Commit

Permalink
Fix fake
Browse files Browse the repository at this point in the history
  • Loading branch information
hweawer committed Sep 2, 2024
1 parent 4731925 commit 8db867a
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions tests/transport/test_base_provider.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any
from typing import Any, List

import pytest
from schema import Or, Schema
Expand All @@ -9,25 +9,27 @@
class FakeMessageProvider(BaseMessageProvider):
MAX_MESSAGES_RECEIVE = 1

def _receive_message(self) -> Any:
return {
'type': 'deposit',
'depositRoot': '0xbc034415ccde0596f39095fd2d99c2fa1e335de3f70b34dcd78e2ab21fa0c5e8',
'nonce': 16,
'blockNumber': 5737984,
'blockHash': '0x432e218931e9b94f0702ecb1b0d084c467a86b384767ce38c4fe164463070532',
'guardianAddress': '0x43464Fe06c18848a2E2e913194D64c1970f4326a',
'guardianIndex': 8,
'signature': {
'r': '0xc2235eb6983f80d19158f807d5d90d93abec52034ea7184bbf164ba211f00116',
's': '0x75354ffc9fb6e7a4b4c01c622661a1d0382ace8c4ff8024626e39ac1a6a613d0',
'_vs': '0x75354ffc9fb6e7a4b4c01c622661a1d0382ace8c4ff8024626e39ac1a6a613d0',
'recoveryParam': 0,
'v': 27,
},
'app': {'version': '1.0.3', 'name': 'lido-council-daemon'},
'stakingModuleId': 2,
}
def _fetch_messages(self) -> List[Any]:
return [
{
'type': 'deposit',
'depositRoot': '0xbc034415ccde0596f39095fd2d99c2fa1e335de3f70b34dcd78e2ab21fa0c5e8',
'nonce': 16,
'blockNumber': 5737984,
'blockHash': '0x432e218931e9b94f0702ecb1b0d084c467a86b384767ce38c4fe164463070532',
'guardianAddress': '0x43464Fe06c18848a2E2e913194D64c1970f4326a',
'guardianIndex': 8,
'signature': {
'r': '0xc2235eb6983f80d19158f807d5d90d93abec52034ea7184bbf164ba211f00116',
's': '0x75354ffc9fb6e7a4b4c01c622661a1d0382ace8c4ff8024626e39ac1a6a613d0',
'_vs': '0x75354ffc9fb6e7a4b4c01c622661a1d0382ace8c4ff8024626e39ac1a6a613d0',
'recoveryParam': 0,
'v': 27,
},
'app': {'version': '1.0.3', 'name': 'lido-council-daemon'},
'stakingModuleId': 2,
}
]


@pytest.mark.unit
Expand Down

0 comments on commit 8db867a

Please sign in to comment.