mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-09-05 02:24:21 -05:00
* rpc: Move `RPCServer._wrap_http_handler` to `chia.rpc.util` * rpc: Introduce `RPCServer.get_routes` * rpc|tests: Introduce RPC endpoint `/get_routes`
15 lines
466 B
Python
15 lines
466 B
Python
async def validate_get_routes(client, api):
|
|
routes_client = (await client.fetch("get_routes", {}))["routes"]
|
|
assert len(routes_client) > 0
|
|
routes_api = list(api.get_routes().keys())
|
|
routes_server = [
|
|
"/get_connections",
|
|
"/open_connection",
|
|
"/close_connection",
|
|
"/stop_node",
|
|
"/get_routes",
|
|
]
|
|
assert len(routes_api) > 0
|
|
for route in routes_api + routes_server:
|
|
assert route in routes_client
|