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

Function test_currencyrate_unknown_source

tests/test_currencyrate.py:553–565  ·  view source on GitHub ↗

Test currencyrate with a non-existent source name returns an error.

(node_factory, fake_rateserver)

Source from the content-addressed store, hash-verified

551
552
553def test_currencyrate_unknown_source(node_factory, fake_rateserver):
554 """Test currencyrate with a non-existent source name returns an error."""
555
556 opts = {
557 "currencyrate-disable-source": ALL_RESOURCES,
558 "currencyrate-add-source": [
559 f"fast,{fake_rateserver['url']}/fast,price",
560 ],
561 }
562 l1 = node_factory.get_node(options=opts)
563
564 with pytest.raises(RpcError, match="Unknown source `nonexistent`"):
565 l1.rpc.call("currencyrate", ["USD", "nonexistent"])
566
567
568def test_currencyrate_too_many_args(node_factory, fake_rateserver):

Callers

nothing calls this directly

Calls 2

get_nodeMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected