Test currencyrate with a non-existent source name returns an error.
(node_factory, fake_rateserver)
| 551 | |
| 552 | |
| 553 | def 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 | |
| 568 | def test_currencyrate_too_many_args(node_factory, fake_rateserver): |