mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-20 16:08:51 +03:00
3b084a165b
* configure isort to add the future annotations import * apply the new isort setting * remove type ignores for new mypy (#13539) https://pypi.org/project/mypy/0.981/ * another
22 lines
692 B
Python
22 lines
692 B
Python
from __future__ import annotations
|
|
|
|
from chia.rpc.rpc_client import RpcClient
|
|
from chia.rpc.rpc_server import RpcApiProtocol
|
|
|
|
|
|
async def validate_get_routes(client: RpcClient, api: RpcApiProtocol) -> None:
|
|
routes_client = (await client.fetch("get_routes", {}))["routes"]
|
|
assert len(routes_client) > 0
|
|
routes_api = list(api.get_routes().keys())
|
|
# TODO: avoid duplication of RpcServer.get_routes()
|
|
routes_server = [
|
|
"/get_connections",
|
|
"/open_connection",
|
|
"/close_connection",
|
|
"/stop_node",
|
|
"/get_routes",
|
|
"/healthz",
|
|
]
|
|
assert len(routes_api) > 0
|
|
assert sorted(routes_client) == sorted(routes_api + routes_server)
|