(node_factory, fake_rateserver)
| 94 | |
| 95 | |
| 96 | def test_invalid_currency(node_factory, fake_rateserver): |
| 97 | opts = { |
| 98 | "currencyrate-disable-source": ALL_RESOURCES, |
| 99 | "currencyrate-add-source": [ |
| 100 | f"invalid,{fake_rateserver['url']}/invalid?currency={{currency_lc}},price" |
| 101 | ], |
| 102 | } |
| 103 | l1 = node_factory.get_node(options=opts) |
| 104 | |
| 105 | with pytest.raises( |
| 106 | RpcError, |
| 107 | match=r"no results for `XXX`, is the currency supported\? Check the logs!", |
| 108 | ): |
| 109 | rates = l1.rpc.call("listcurrencyrates", ["XXX"]) |
| 110 | LOGGER.info(rates) |
| 111 | |
| 112 | l1.daemon.wait_for_log("failed to get `XXX` rate from invalid") |
| 113 | |
| 114 | |
| 115 | class _ServerThread(threading.Thread): |
nothing calls this directly
no test coverage detected