MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_json_error

Function test_json_error

tests/test_misc.py:2083–2091  ·  view source on GitHub ↗

Must return valid json even if it quotes our weirdness

(node_factory)

Source from the content-addressed store, hash-verified

2081
2082
2083def test_json_error(node_factory):
2084 """Must return valid json even if it quotes our weirdness"""
2085 l1 = node_factory.get_node()
2086 l1.rpc.check_request_schemas = False
2087 with pytest.raises(RpcError, match=r'id: should be a channel ID or short channel ID: invalid token'):
2088 l1.rpc.close({"tx": "020000000001011490f737edd2ea2175a032b58ea7cd426dfc244c339cd044792096da3349b18a0100000000ffffffff021c900300000000001600140e64868e2f752314bc82a154c8c5bf32f3691bb74da00b00000000002200205b8cd3b914cf67cdd8fa6273c930353dd36476734fbd962102c2df53b90880cd0247304402202b2e3195a35dc694bbbc58942dc9ba59cc01d71ba55c9b0ad0610ccd6a65633702201a849254453d160205accc00843efb0ad1fe0e186efa6a7cee1fb6a1d36c736a012103d745445c9362665f22e0d96e9e766f273f3260dea39c8a76bfa05dd2684ddccf00000000", "txid": "2128c10f0355354479514f4a23eaa880d94e099406d419bbb0d800143accddbb", "channel_id": "bbddcc3a1400d8b0bb19d40694094ed980a8ea234a4f5179443555030fc12820"})
2089
2090 # Should not corrupt following RPC
2091 l1.rpc.getinfo()
2092
2093
2094def test_check_command(node_factory):

Callers

nothing calls this directly

Calls 3

get_nodeMethod · 0.45
closeMethod · 0.45
getinfoMethod · 0.45

Tested by

no test coverage detected