mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-11-10 12:29:49 +03:00
0a0c8920ff
* make daemon heartbeat configurable and increase default * Fix up daemon rpc test * Fix dumb error with parameters * Restore formatting * Various updates from feedback * Update tests/core/test_daemon_rpc.py use config value for heartbeat Co-authored-by: Kyle Altendorf <sda@fstab.net> * black fixes Co-authored-by: Kyle Altendorf <sda@fstab.net>
26 lines
711 B
Python
26 lines
711 B
Python
from __future__ import annotations
|
|
|
|
import pytest
|
|
|
|
from chia import __version__
|
|
from chia.daemon.client import connect_to_daemon
|
|
|
|
|
|
class TestDaemonRpc:
|
|
@pytest.mark.asyncio
|
|
async def test_get_version_rpc(self, get_daemon, bt):
|
|
ws_server = get_daemon
|
|
config = bt.config
|
|
client = await connect_to_daemon(
|
|
config["self_hostname"],
|
|
config["daemon_port"],
|
|
50 * 1000 * 1000,
|
|
bt.get_daemon_ssl_context(),
|
|
heartbeat=config["daemon_heartbeat"],
|
|
)
|
|
response = await client.get_version()
|
|
|
|
assert response["data"]["success"]
|
|
assert response["data"]["version"] == __version__
|
|
ws_server.stop()
|