Skip to content

Commit 9564406

Browse files
committed
More tests
1 parent a7d92f7 commit 9564406

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/unit_tests/asyncio_/test_substrate_interface.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ async def test_websocket_shutdown_timer():
120120

121121
@pytest.mark.asyncio
122122
async def test_legacy_decoding():
123-
pre_metadata_v15_block = 3_014_300 # several blocks before metadata v15 was added
123+
# roughly 4000 blocks before metadata v15 was added
124+
pre_metadata_v15_block = 3_010_611
124125

125126
async with AsyncSubstrateInterface(ARCHIVE_ENTRYPOINT) as substrate:
126127
block_hash = await substrate.get_block_hash(pre_metadata_v15_block)
@@ -135,3 +136,10 @@ async def test_legacy_decoding():
135136
async for key, value in query_map_result:
136137
assert isinstance(key, int)
137138
assert isinstance(value, ScaleObj)
139+
140+
unix = await substrate.query(
141+
"Timestamp",
142+
"Now",
143+
block_hash=block_hash,
144+
)
145+
assert unix.value == 1716358476004

0 commit comments

Comments
 (0)